-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLLM-Wiki-Guide.html
More file actions
1415 lines (1271 loc) · 91.4 KB
/
LLM-Wiki-Guide.html
File metadata and controls
1415 lines (1271 loc) · 91.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>LLM-Wiki — Complete User & Technical Guide</title>
<meta name="description" content="Complete documentation for LLM-Wiki: an autonomous knowledge base plugin for Claude Code with semantic search, web research, and Wikipedia-style web UI.">
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/7.23.9/babel.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Fraunces:opsz,wght@9..144,400;9..144,700&display=swap" rel="stylesheet"/>
<style>
:root {
--bg: #fafaf9; --bg-alt: #f5f5f4; --bg-card: #ffffff; --border: #e7e5e4;
--text: #1c1917; --text-muted: #78716c; --text-light: #a8a29e;
--accent: #0f766e; --accent-light: #ccfbf1; --accent-hover: #115e59;
--code-bg: #1e293b; --code-text: #e2e8f0;
--warn: #d97706; --warn-bg: #fffbeb; --warn-border: #fde68a;
--info: #0284c7; --info-bg: #f0f9ff; --info-border: #bae6fd;
--success: #16a34a; --success-bg: #f0fdf4; --success-border: #bbf7d0;
--danger: #dc2626; --danger-bg: #fef2f2; --danger-border: #fecaca;
--sidebar-w: 280px; --header-h: 56px;
--radius: 6px; --shadow: 0 1px 3px rgba(0,0,0,.08);
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family:'IBM Plex Sans',system-ui,sans-serif; color:var(--text); background:var(--bg); line-height:1.65; font-size:15px; }
h1,h2,h3,h4 { font-family:'Fraunces',Georgia,serif; font-weight:700; line-height:1.25; }
.header { position:fixed; top:0; left:0; right:0; height:var(--header-h); background:var(--bg-card);
border-bottom:1px solid var(--border); display:flex; align-items:center; padding:0 24px; z-index:100; backdrop-filter:blur(12px); }
.header-logo { font-family:'Fraunces',serif; font-size:20px; font-weight:700; color:var(--accent); }
.header-logo span { color:var(--text-muted); font-weight:400; font-size:14px; margin-left:8px; }
.header-badge { margin-left:12px; font-size:11px; font-weight:600; background:var(--accent-light); color:var(--accent); padding:2px 8px; border-radius:99px; }
.header-right { margin-left:auto; display:flex; gap:12px; align-items:center; }
.header-right a { font-size:13px; color:var(--text-muted); text-decoration:none; }
.header-right a:hover { color:var(--accent); }
.version-tag { font-size:11px; background:var(--bg-alt); border:1px solid var(--border); padding:2px 8px; border-radius:4px; color:var(--text-muted); }
.print-only { display:none; }
@media print {
.sidebar, .header { display:none; }
.main { margin-left:0; margin-top:0; padding:20px; max-width:none; }
.print-only { display:block; }
body { font-size:12pt; line-height:1.5; }
.card { break-inside:avoid; box-shadow:none; border:1px solid #ddd; }
.code-block { background:#f5f5f5; color:#333; break-inside:avoid; }
}
.sidebar { position:fixed; top:var(--header-h); left:0; bottom:0; width:var(--sidebar-w);
background:var(--bg-card); border-right:1px solid var(--border); overflow-y:auto; padding:16px 0; z-index:90; transition:transform .2s; }
.sidebar::-webkit-scrollbar { width:4px; } .sidebar::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }
.nav-section { padding:0 16px; margin-bottom:4px; }
.nav-section-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:var(--text-light); padding:12px 0 4px; }
.nav-item { display:flex; align-items:center; gap:8px; padding:7px 12px; border-radius:var(--radius);
font-size:13.5px; color:var(--text-muted); cursor:pointer; transition:all .12s; text-decoration:none; }
.nav-item:hover { background:var(--bg-alt); color:var(--text); }
.nav-item.active { background:var(--accent-light); color:var(--accent); font-weight:500; }
.nav-icon { width:16px; height:16px; flex-shrink:0; opacity:.6; }
.nav-item.active .nav-icon { opacity:1; }
.main { margin-left:var(--sidebar-w); margin-top:var(--header-h); padding:32px 48px 80px; max-width:960px; }
.main section { margin-bottom:56px; }
.section-title { font-size:28px; color:var(--text); margin-bottom:6px; }
.section-subtitle { font-size:15px; color:var(--text-muted); margin-bottom:24px; }
.card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:20px 24px; margin-bottom:16px; box-shadow:var(--shadow); }
.card-header { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.card-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.card-title { font-family:'Fraunces',serif; font-size:17px; font-weight:700; }
.card-desc { font-size:14px; color:var(--text-muted); line-height:1.6; }
.code-block { background:var(--code-bg); color:var(--code-text); border-radius:var(--radius); padding:16px 20px; margin:12px 0; font-family:'IBM Plex Mono',monospace; font-size:13px; line-height:1.7; overflow-x:auto; position:relative; }
.code-block .code-label { position:absolute; top:8px; right:12px; font-size:10px; color:#64748b; text-transform:uppercase; letter-spacing:.05em; }
code { font-family:'IBM Plex Mono',monospace; font-size:13px; background:var(--bg-alt); padding:1px 5px; border-radius:3px; color:var(--accent); }
.callout { border-radius:var(--radius); padding:14px 18px; margin:14px 0; font-size:14px; display:flex; gap:10px; }
.callout-icon { font-size:16px; flex-shrink:0; margin-top:1px; }
.callout.info { background:var(--info-bg); border:1px solid var(--info-border); color:#0c4a6e; }
.callout.warn { background:var(--warn-bg); border:1px solid var(--warn-border); color:#92400e; }
.callout.success { background:var(--success-bg); border:1px solid var(--success-border); color:#14532d; }
.callout.danger { background:var(--danger-bg); border:1px solid var(--danger-border); color:#7f1d1d; }
.table-wrap { overflow-x:auto; margin:12px 0; }
table { width:100%; border-collapse:collapse; font-size:13.5px; }
th { text-align:left; font-weight:600; padding:10px 14px; background:var(--bg-alt); border-bottom:2px solid var(--border); font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); }
td { padding:10px 14px; border-bottom:1px solid var(--border); vertical-align:top; }
tr:hover td { background:var(--bg-alt); }
.badge { display:inline-flex; align-items:center; font-size:11px; font-weight:600; padding:2px 8px; border-radius:99px; letter-spacing:.02em; }
.badge.green { background:#dcfce7; color:#166534; } .badge.blue { background:#dbeafe; color:#1e40af; }
.badge.amber { background:#fef3c7; color:#92400e; } .badge.red { background:#fee2e2; color:#991b1b; }
.badge.gray { background:#f3f4f6; color:#4b5563; } .badge.teal { background:var(--accent-light); color:var(--accent); }
.step { display:flex; gap:16px; margin-bottom:20px; }
.step-num { width:28px; height:28px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex-shrink:0; margin-top:2px; }
.step-body { flex:1; } .step-title { font-weight:600; font-size:15px; margin-bottom:4px; }
.step-desc { font-size:14px; color:var(--text-muted); }
.diagram { background:var(--bg-alt); border:1px solid var(--border); border-radius:var(--radius); padding:24px; margin:16px 0; overflow-x:auto; }
.diagram svg { display:block; margin:0 auto; }
.tabs { display:flex; gap:2px; border-bottom:2px solid var(--border); margin-bottom:16px; }
.tab { padding:8px 16px; font-size:13px; font-weight:500; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; transition:all .12s; }
.tab:hover { color:var(--text); } .tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.expand-header { display:flex; align-items:center; gap:8px; cursor:pointer; padding:10px 0; user-select:none; }
.expand-header:hover { color:var(--accent); }
.expand-arrow { transition:transform .2s; font-size:12px; } .expand-arrow.open { transform:rotate(90deg); }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }
.flow-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:12px 0; }
.flow-box { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:8px 14px; font-size:13px; font-weight:500; white-space:nowrap; }
.flow-arrow { color:var(--text-light); font-size:18px; }
.search-box { display:flex; align-items:center; gap:8px; background:var(--bg-alt); border:1px solid var(--border); border-radius:var(--radius); padding:8px 14px; margin-bottom:20px; }
.search-box input { flex:1; border:none; background:none; outline:none; font-size:14px; font-family:inherit; color:var(--text); }
.search-box input::placeholder { color:var(--text-light); }
.dep-card { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:12px 16px; margin-bottom:8px; }
.dep-card .dep-name { font-weight:600; font-size:14px; } .dep-card .dep-type { font-size:11px; font-weight:600; }
.mobile-toggle { display:none; background:none; border:none; cursor:pointer; padding:8px; }
@keyframes pulse { 0%, 100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes slideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes flowAnim { 0% { strokeDashoffset:100%; } 100% { strokeDashoffset:0%; } }
@keyframes glowPulse { 0%, 100% { filter:drop-shadow(0 0 3px currentColor); } 50% { filter:drop-shadow(0 0 8px currentColor); } }
@keyframes progressBar { 0% { transform:translateX(-100%); } 100% { transform:translateX(100%); } }
@keyframes nodeFloat { 0%, 100% { transform:translateY(0px); } 50% { transform:translateY(-3px); } }
.arch-layer { transition:all 0.2s ease; cursor:pointer; }
.arch-layer:hover { filter:drop-shadow(0 0 8px rgba(15, 118, 110, 0.4)); }
.network-node { transition:all 0.2s ease; }
.network-node:hover { filter:drop-shadow(0 0 6px rgba(0,0,0,0.2)); }
.pipeline-step { animation: slideIn 0.3s ease-out; }
.pipeline-step.active { filter:drop-shadow(0 0 6px rgba(15, 118, 110, 0.5)); }
.freshness-tier { transition:all 0.2s ease; cursor:pointer; position:relative; }
.freshness-tier:hover { transform:translateY(-2px); filter:drop-shadow(0 0 4px rgba(0,0,0,0.15)); }
.freshness-tooltip { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); background:var(--text); color:white; padding:8px 12px; border-radius:4px; font-size:12px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity 0.2s; margin-bottom:8px; }
.freshness-tier:hover .freshness-tooltip { opacity:1; }
.circuit-state { transition:all 0.3s ease; }
.circuit-state.pulse { animation:pulse 1s infinite; }
.stats-counter { font-family:'IBM Plex Mono', monospace; font-weight:600; }
@media(max-width:860px) {
.sidebar { transform:translateX(-100%); } .sidebar.open { transform:translateX(0); }
.main { margin-left:0; padding:24px 20px 80px; }
.mobile-toggle { display:block; } .grid-2,.grid-3 { grid-template-columns:1fr; }
}
</style>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
const {useState, useEffect, useCallback, useRef} = React;
const Icons = {
book: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>,
download: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>,
layers: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>,
terminal: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>,
cpu: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><rect x="4" y="4" width="16" height="16" rx="2" ry="2"/><rect x="9" y="9" width="6" height="6"/><line x1="9" y1="1" x2="9" y2="4"/><line x1="15" y1="1" x2="15" y2="4"/><line x1="9" y1="20" x2="9" y2="23"/><line x1="15" y1="20" x2="15" y2="23"/><line x1="20" y1="9" x2="23" y2="9"/><line x1="20" y1="14" x2="23" y2="14"/><line x1="1" y1="9" x2="4" y2="9"/><line x1="1" y1="14" x2="4" y2="14"/></svg>,
globe: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>,
search: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>,
bot: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="11" width="18" height="10" rx="2"/><circle cx="12" cy="5" r="2"/><path d="M12 7v4"/><line x1="8" y1="16" x2="8" y2="16"/><line x1="16" y1="16" x2="16" y2="16"/></svg>,
wrench: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>,
database: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>,
zap: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>,
shield: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>,
monitor: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>,
pkg: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M16.5 9.4l-9-5.19"/><path d="M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>,
menu: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg>,
};
const NAV = [
{group:"Getting Started", items:[
{id:"overview",icon:"book",label:"Overview"},
{id:"install",icon:"download",label:"Installation"},
{id:"quickstart",icon:"zap",label:"Quick Start"},
]},
{group:"Architecture", items:[
{id:"architecture",icon:"layers",label:"System Architecture"},
{id:"data-model",icon:"database",label:"Data Model"},
{id:"mcp",icon:"cpu",label:"MCP Server"},
{id:"research",icon:"search",label:"Research Engine"},
]},
{group:"User Guide", items:[
{id:"skills",icon:"terminal",label:"Skills (Commands)"},
{id:"agents",icon:"bot",label:"Agents"},
{id:"webui",icon:"monitor",label:"Web UI"},
{id:"cli",icon:"wrench",label:"CLI Utilities"},
]},
{group:"Advanced", items:[
{id:"custom-types",icon:"layers",label:"Custom Page Types"},
{id:"rules",icon:"shield",label:"Rules & Behavior"},
]},
{group:"Technical Reference", items:[
{id:"search",icon:"search",label:"Search & Retrieval"},
{id:"quality",icon:"shield",label:"Quality & Provenance"},
{id:"troubleshooting",icon:"wrench",label:"Troubleshooting"},
{id:"deps",icon:"pkg",label:"Dependencies"},
]},
];
const SKILLS = [
{cmd:"/wiki-write", args:"<source>", purpose:"Add content from URL, file, or text", color:"#0f766e",
details:"Ingests content autonomously into the wiki. Accepts URLs (fetched via Jina Reader → Trafilatura → raw HTML chain), local file paths, inline text, batch directories, or slug updates. Auto-creates the .wiki/ structure on first use. Each ingest generates a page with full YAML frontmatter, creates backlinks, updates index.md, and appends to log.md. Custom page types are supported via templates in .wiki/templates/.",
examples:["/wiki-write https://arxiv.org/abs/2301.13379","/wiki-write ./notes/meeting.md",'/wiki-write "React Server Components enable streaming SSR"',"/wiki-write --batch ./research-papers/","/wiki-write --update transformer-architecture","/wiki-write --refresh-stale"],
flow:["Source input","Fetch / read","Extract content","Generate slug","Detect contradictions","Save to .wiki/pages/","Update backlinks","Update index.md"]},
{cmd:"/wiki-read", args:"<question>", purpose:"Search wiki, get cited answers", color:"#0284c7",
details:"Queries the wiki knowledge base and synthesizes cited answers. Three depth modes: quick (index scan only), standard (reads 2–4 relevant pages), deep (articles + raw sources + cross-references). Uses TF-IDF full-text search for ranked results. All answers include [[slug]] citations. Contradictions between sources are explicitly noted.",
examples:["/wiki-read What is RLHF?","/wiki-read quick list all ML pages","/wiki-read deep How do transformers handle long-range dependencies?"],
flow:["Parse question","Check index.md","Full-text search","Read relevant pages","Synthesize answer","Add [[citations]]","Note contradictions"]},
{cmd:"/wiki-serve", args:"", purpose:"Start Wikipedia-style website on localhost:8420", color:"#dc2626",
details:"Launches a FastAPI web server with a Wikipedia-style browsable interface. Only runs when explicitly invoked. Features: 4 themes (light, dark, terminal, Wikipedia), interactive knowledge graph (Cytoscape.js), split-pane markdown editor with live preview, WebSocket chat with RAG-augmented Q&A, live research (click any red link to auto-research), spaced repetition review (FSRS), content gap analysis, canvas/whiteboard view, and SSE progress streaming. Can also be launched manually via CLI.",
examples:["/wiki-serve","/wiki-serve stop","python skills/serve/scripts/server.py --wiki-dir .wiki/ --port 8420"],
flow:["Start FastAPI","Build search index","Load WikiStore","Init WebSocket","Open browser","Serve at :8420"]},
{cmd:"/wiki-maintain", args:"", purpose:"Lint, deduplicate, upgrade confidence, gap analysis", color:"#ea580c",
details:"Runs comprehensive wiki health maintenance. Lint pass: fixes broken [[links]], missing frontmatter fields, detects orphan pages. Dedup pass: finds pages with >60% slug token overlap, suggests merges. Confidence upgrades: promotes pages from low→medium (2+ sources) or medium→high (3+ corroborating). Stale detection: flags pages >90 days without update. Auto-generates concept synthesis articles when 3+ pages share link targets.",
examples:["/wiki-maintain","/wiki-maintain lint","/wiki-maintain dedup","/wiki-maintain gaps"],
flow:["Scan all pages","Lint broken links","Fix frontmatter","Detect duplicates","Upgrade confidence","Flag stale content","Analyze gaps","Regenerate index"]},
{cmd:"/wiki-view", args:"", purpose:"Dashboard, knowledge graph, stats, export", color:"#2563eb",
details:"Provides read-only dashboard views and export capabilities. Dashboard shows page counts by type and confidence, recent activity, and health metrics. Knowledge graph renders an interactive visualization. Export supports HTML (self-contained with sidebar + search), Markdown (with TOC), and JSON (nodes + edges). Can also generate derived artifacts: study guides, timelines, glossaries, and comparison tables.",
examples:["/wiki-view","/wiki-view pages","/wiki-view stats","/wiki-view graph","/wiki-view graph transformer-architecture","/wiki-view export html","/wiki-view export json","/wiki-view artifacts glossary"],
flow:["Read wiki state","Compute metrics","Render dashboard","Generate graph","Export format"]},
];
const AGENTS = [
{name:"wiki-writer",desc:"Creates and updates wiki pages. Both ingest and update modes are fully autonomous. Handles slug generation, frontmatter creation, contradiction detection, backlink cascading, and concurrent write safety via lock files. Supports custom page type templates from .wiki/templates/.",trigger:"Any write operation to the wiki",color:"#0f766e"},
{name:"wiki-reader",desc:"Answers questions from wiki knowledge. Navigates via index.md, supports quick/standard/deep depth modes. Uses TF-IDF full-text search for ranked results. Cites via [[slug]] references and presents contradictions explicitly.",trigger:"Any question that might be answered by wiki content",color:"#0284c7"},
{name:"wiki-auditor",desc:"Audits wiki health inline. Scans all pages for broken links, missing frontmatter, orphan pages, near-duplicates (Jaccard >60%), and dead index entries. Applies fixes directly to files.",trigger:"/wiki-maintain command or periodic health checks",color:"#ea580c"},
{name:"backlink-manager",desc:"Maintains the bidirectional backlink index. Updates 'related' fields automatically, detects unlinked mentions of page titles across the wiki, and ensures link consistency when pages are renamed or deleted.",trigger:"After any page write or rename operation",color:"#16a34a"},
{name:"search-orchestrator",desc:"Orchestrates multi-channel search. Classifies research complexity (simple/moderate/complex), checks existing wiki coverage, generates diverse query variants, fans out to channel subagents, and merges/deduplicates results by URL, DOI, and title similarity.",trigger:"Research fallback during /wiki-read when wiki lacks coverage",color:"#7c3aed"},
{name:"search-channel",desc:"Executes parameterized searches for a specific channel type (web, docs). Each channel has its own fetch logic, caching TTL, and result normalization. Returns standardized {title, url, snippet, source_type, credibility_tier} objects.",trigger:"Called by search-orchestrator for each channel",color:"#6366f1"},
{name:"research-loop",desc:"Runs autonomous iterative research (max 3 iterations). Each iteration: creates checkpoint, generates hypotheses, launches search-orchestrator, ingests via wiki-writer, evaluates quality metrics, and keeps or discards based on improvement. Stops early if metrics plateau.",trigger:"Deep research mode during /wiki-read deep",color:"#9333ea"},
{name:"research-processor",desc:"Post-processes parallel research results from search-orchestrator. Two modes: condense (extract findings, deduplicate, score confidence, detect stale) and deduplicate (merge by URL, DOI, title similarity >85%, content hash). Ranks by credibility × corroboration × recency.",trigger:"Called by search-orchestrator after channel results are collected",color:"#a855f7"},
{name:"fact-checker",desc:"Verifies factual claims against external sources. Extracts verifiable claims (numbers, dates, entities, comparisons), verifies each via WebSearch (max 3 searches/claim, 10 claims/page). Assigns status: verified, unverified, disputed, or outdated.",trigger:"/wiki-maintain fact-check or during deep-dive research iterations",color:"#dc2626"},
{name:"citation-explorer",desc:"Explores citation chains for a topic. Uses web search to trace citation relationships, identifies key papers by citation count, recency, and relevance. Recommends top 5–10 papers for wiki ingestion.",trigger:"During deep-dive research iterations when citation chains are relevant",color:"#0891b2"},
];
const CLI_UTILS = [
{name:"backlinks.py",desc:"SQLite-backed backlink index — build, query, verify bidirectional consistency, detect broken links and orphans"},
{name:"cache.py",desc:"2-layer search cache with channel-specific TTLs (web:7d, docs:7d), stale-while-revalidate, adaptive TTL"},
{name:"circuit_breaker.py",desc:"Circuit breaker for external APIs — closed->open->half-open states, 5-failure threshold, 300s cooldown"},
{name:"citation_graph.py",desc:"Academic citation graph construction — snowball from seed papers, PageRank-style influence scoring, graph export"},
{name:"claims.py",desc:"Claim extraction & verification tracking — quantitative, entity, comparative claim types with status lifecycle"},
{name:"daily.py",desc:"Daily notes & journal — templated daily pages, weekly rollup summaries, date-range search"},
{name:"diff.py",desc:"Structured wiki page diffs — frontmatter, sections, links comparison with JSON/markdown/HTML output"},
{name:"exceptions.py",desc:"Custom exception hierarchy — WikiError base class with FetchError, CacheError, SearchError, PageNotFoundError, etc."},
{name:"export.py",desc:"Multi-format export — self-contained HTML with navigation, Markdown with TOC, JSON knowledge graph"},
{name:"fetch.py",desc:"URL fetching with extraction chain: Jina Reader → Trafilatura → raw HTML fallback, markdown conversion"},
{name:"flashcards.py",desc:"FSRS-based spaced repetition — question/definition/takeaway cards, difficulty + stability tracking, due scheduling"},
{name:"gaps.py",desc:"Multi-dimensional gap analysis — structural holes, depth gaps, freshness gaps, missing pages, isolated nodes"},
{name:"mentions.py",desc:"Unlinked mention detection — case-insensitive title scanning across all pages with context and line numbers"},
{name:"provenance.py",desc:"W3C PROV-inspired provenance — activities, entities, derivations with full chain tracing and graph export"},
{name:"query.py",desc:"Frontmatter query engine — Dataview-like SELECT/COUNT/LIST syntax for querying wiki page metadata"},
{name:"rag.py",desc:"RAG pipeline — TF-IDF full-text search with section chunking, citation-grounded Q&A prompts"},
{name:"search-academic.py",desc:"Academic paper search — arXiv, Semantic Scholar, PubMed APIs with metadata extraction and PDF downloading"},
{name:"search-code.py",desc:"Code search across repositories — GitHub, GitLab, Bitbucket with file type filtering and snippet extraction"},
{name:"search-fulltext.py",desc:"TF-IDF full-text search — in-memory index, stop word filtering, title/paragraph boosts, snippet extraction"},
{name:"search-wikipedia.py",desc:"Wikipedia article search — MediaWiki Action API integration with disambiguation handling"},
{name:"tools.py",desc:"Deterministic utilities replacing LLM calls — slug dedup, similarity scoring, summarization to save tokens"},
{name:"wiki_git.py",desc:"Activity logging with attribution and history tracking"},
{name:"wiki_logging.py",desc:"Shared logging configuration — structured JSON or colored text output, configurable via WIKI_LOG_LEVEL / WIKI_LOG_FORMAT"},
];
const MCP_TOOLS = [
{name:"wiki_search",args:"query, limit?",desc:"Full-text search across all wiki pages, returns ranked results with snippets"},
{name:"wiki_read",args:"slug",desc:"Read a single wiki page by slug, returns full content with frontmatter"},
{name:"wiki_write",args:"slug, content, frontmatter",desc:"Create or update a wiki page with YAML frontmatter and markdown body"},
{name:"wiki_list",args:"type?, confidence?",desc:"List all pages with optional filtering by type and confidence level"},
{name:"wiki_backlinks",args:"slug",desc:"Get all pages that link to the given page slug"},
{name:"wiki_stats",args:"",desc:"Wiki-wide statistics: page counts by type, confidence distribution, link density"},
{name:"wiki_query",args:"query_string",desc:"Dataview-like frontmatter queries (SELECT, COUNT, LIST syntax)"},
{name:"wiki_gaps",args:"",desc:"Content gap analysis: missing pages, shallow hubs, stale content, structural holes"},
{name:"wiki_daily",args:"date?",desc:"Create or retrieve daily note page for the given date (defaults to today)"},
];
const EXTERNAL_DEPS = [
{name:"Claude Code",type:"required",cat:"Host",desc:"Plugin host environment. LLM-Wiki is a Claude Code plugin and requires Claude Code to run."},
{name:"Python 3.10+",type:"required",cat:"Runtime",desc:"All bin/ scripts, MCP server, and web server are Python."},
{name:"FastAPI + Uvicorn",type:"required",cat:"Python (pip)",desc:"Powers the /wiki-serve web UI. Installed via requirements.txt."},
{name:"markdown-it-py + mdit-py-plugins",type:"required",cat:"Python (pip)",desc:"Markdown rendering for wiki pages. Installed via requirements.txt."},
{name:"Jinja2",type:"required",cat:"Python (pip)",desc:"HTML template engine for the web UI. Installed via requirements.txt."},
{name:"watchdog",type:"required",cat:"Python (pip)",desc:"Filesystem watcher for live-reloading wiki changes in the web UI."},
{name:"aiosqlite",type:"required",cat:"Python (pip)",desc:"Async SQLite access for the web server's WikiStore."},
{name:"websockets",type:"required",cat:"Python (pip)",desc:"WebSocket support for the chat sidebar in the web UI."},
{name:"mcp",type:"required",cat:"Python (pip)",desc:"Model Context Protocol SDK for the wiki MCP server."},
{name:"Jina Reader API",type:"external",cat:"Free API",desc:"URL content extraction (first method in the fetch chain). Used by fetch.py. Free tier available."},
{name:"Context7 MCP",type:"external",cat:"MCP Server",desc:"Documentation search channel. Used by the docs search channel if installed. Requires separate MCP server installation. Falls back to WebSearch with site filters if unavailable."},
{name:"Claude Code WebSearch",type:"builtin",cat:"Built-in",desc:"Web search tool built into Claude Code. Used by the web search channel and fact-checker agent."},
];
function Expandable({title, children, defaultOpen=false}) {
const [open, setOpen] = useState(defaultOpen);
return <div style={{borderBottom:'1px solid var(--border)', marginBottom:4}}>
<div className="expand-header" onClick={()=>setOpen(!open)}>
<span className={`expand-arrow ${open?'open':''}`}>{'\u25B6'}</span>
<span style={{fontWeight:600,fontSize:14}}>{title}</span>
</div>
{open && <div style={{paddingBottom:12,paddingLeft:4}}>{children}</div>}
</div>;
}
function CodeBlock({children, label}) {
return <div className="code-block">{label && <span className="code-label">{label}</span>}<pre style={{margin:0,whiteSpace:'pre-wrap'}}>{children}</pre></div>;
}
function Callout({type="info", children}) {
const icons = {info:"ℹ️", warn:"⚠️", success:"✅", danger:"🚫"};
return <div className={`callout ${type}`}><span className="callout-icon">{icons[type]}</span><div>{children}</div></div>;
}
function FlowDiagram({steps}) {
return <div className="flow-row">{steps.map((s,i) => <React.Fragment key={i}>{i>0 && <span className="flow-arrow">→</span>}<span className="flow-box">{s}</span></React.Fragment>)}</div>;
}
function Badge({color="teal", children}) {
return <span className={`badge ${color}`}>{children}</span>;
}
// Interactive Architecture Diagram with hover effects and full inner details
function ArchDiagram() {
const [hoveredLayer, setHoveredLayer] = useState(null);
const hl = (id) => hoveredLayer === id;
const glow = (id) => hl(id) ? 'drop-shadow(0 0 8px rgba(15,118,110,0.35))' : 'none';
const sw = (id) => hl(id) ? 2.5 : 1.5;
const connOp = (...ids) => ids.some(id => hl(id)) ? 1 : 0.5;
return <div className="diagram" style={{overflowX:'auto'}}>
<svg width="820" height="480" viewBox="0 0 820 480" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="410" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">LLM-Wiki System Architecture</text>
{/* USER LAYER */}
<g className="arch-layer" onMouseEnter={()=>setHoveredLayer('user')} onMouseLeave={()=>setHoveredLayer(null)}>
<rect x="20" y="44" width="780" height="60" rx="8" fill="#f0fdf4" stroke="#86efac" strokeWidth={sw('user')} style={{filter:glow('user')}}/>
<text x="40" y="65" fontSize="10" fontWeight="600" fill="#166534" letterSpacing=".06em">USER LAYER</text>
{[["Claude Code",40],["CLI Skills",160],["Web UI :8420",280],["MCP Clients",420],["Obsidian",560]].map(([l,x])=>
<React.Fragment key={l}><rect x={x} y="72" width={l.length>10?120:100} height="24" rx="4" fill="#fff" stroke="#86efac"/>
<text x={x+(l.length>10?60:50)} y="88" textAnchor="middle" fontSize="11" fill="#166534">{l}</text></React.Fragment>)}
</g>
<line x1="410" y1="104" x2="410" y2="130" stroke="#a8a29e" strokeWidth="1.5" markerEnd="url(#arrow)" style={{opacity:connOp('user','agent'), transition:'opacity 0.2s'}}/>
{/* AGENT LAYER */}
<g className="arch-layer" onMouseEnter={()=>setHoveredLayer('agent')} onMouseLeave={()=>setHoveredLayer(null)}>
<rect x="20" y="130" width="780" height="100" rx="8" fill="#eff6ff" stroke="#93c5fd" strokeWidth={sw('agent')} style={{filter:glow('agent')}}/>
<text x="40" y="151" fontSize="10" fontWeight="600" fill="#1e40af" letterSpacing=".06em">AGENT LAYER — 10 Autonomous Agents</text>
{[["wiki-writer",40],["wiki-reader",158],["wiki-auditor",276],["search-orch.",394],["search-channel",512]].map(([l,x])=>
<React.Fragment key={l}><rect x={x} y="160" width="108" height="24" rx="4" fill="#fff" stroke="#93c5fd"/>
<text x={x+54} y="176" textAnchor="middle" fontSize="10" fill="#1e40af">{l}</text></React.Fragment>)}
{[["research-loop",40],["research-proc.",158],["fact-checker",276],["citation-expl.",394],["backlink-mgr",512]].map(([l,x])=>
<React.Fragment key={l}><rect x={x} y="195" width="108" height="24" rx="4" fill="#fff" stroke="#93c5fd"/>
<text x={x+54} y="211" textAnchor="middle" fontSize="10" fill="#1e40af">{l}</text></React.Fragment>)}
</g>
<line x1="410" y1="230" x2="410" y2="256" stroke="#a8a29e" strokeWidth="1.5" markerEnd="url(#arrow)" style={{opacity:connOp('agent','bin','servers'), transition:'opacity 0.2s'}}/>
{/* BIN/ UTILITIES — left half */}
<g className="arch-layer" onMouseEnter={()=>setHoveredLayer('bin')} onMouseLeave={()=>setHoveredLayer(null)}>
<rect x="20" y="256" width="380" height="80" rx="8" fill="#faf5ff" stroke="#d8b4fe" strokeWidth={sw('bin')} style={{filter:glow('bin')}}/>
<text x="40" y="277" fontSize="10" fontWeight="600" fill="#6b21a8" letterSpacing=".06em">BIN/ UTILITIES — 23 Scripts</text>
<text x="40" y="296" fontSize="10" fill="#7e22ce">rag.py · fetch.py · query.py · backlinks.py</text>
<text x="40" y="311" fontSize="10" fill="#7e22ce">cache.py · circuit_breaker.py · search-*.py</text>
<text x="40" y="326" fontSize="10" fill="#7e22ce">claims.py · provenance.py · export.py · ...</text>
</g>
{/* SERVERS — right half */}
<g className="arch-layer" onMouseEnter={()=>setHoveredLayer('servers')} onMouseLeave={()=>setHoveredLayer(null)}>
<rect x="420" y="256" width="380" height="80" rx="8" fill="#fff7ed" stroke="#fdba74" strokeWidth={sw('servers')} style={{filter:glow('servers')}}/>
<text x="440" y="277" fontSize="10" fontWeight="600" fill="#9a3412" letterSpacing=".06em">SERVERS</text>
<rect x="440" y="286" width="155" height="24" rx="4" fill="#fff" stroke="#fdba74"/>
<text x="517" y="302" textAnchor="middle" fontSize="10" fill="#9a3412">MCP Server (FastMCP)</text>
<rect x="440" y="316" width="155" height="14" rx="4" fill="#fff" stroke="#fdba74"/>
<text x="517" y="327" textAnchor="middle" fontSize="9" fill="#9a3412">FastAPI (on-demand)</text>
<rect x="615" y="286" width="165" height="44" rx="4" fill="#fff" stroke="#fdba74"/>
<text x="697" y="306" textAnchor="middle" fontSize="10" fill="#9a3412">WikiStore · RAG Handler</text>
<text x="697" y="322" textAnchor="middle" fontSize="10" fill="#9a3412">ChatManager · ResearchQ</text>
</g>
<line x1="210" y1="336" x2="210" y2="362" stroke="#a8a29e" strokeWidth="1.5" markerEnd="url(#arrow)" style={{opacity:connOp('bin','data'), transition:'opacity 0.2s'}}/>
<line x1="610" y1="336" x2="610" y2="362" stroke="#a8a29e" strokeWidth="1.5" markerEnd="url(#arrow)" style={{opacity:connOp('servers','data'), transition:'opacity 0.2s'}}/>
{/* DATA LAYER */}
<g className="arch-layer" onMouseEnter={()=>setHoveredLayer('data')} onMouseLeave={()=>setHoveredLayer(null)}>
<rect x="20" y="362" width="780" height="56" rx="8" fill="#fefce8" stroke="#fde047" strokeWidth={sw('data')} style={{filter:glow('data')}}/>
<text x="40" y="383" fontSize="10" fontWeight="600" fill="#854d0e" letterSpacing=".06em">DATA LAYER — .wiki/ directory</text>
{[["pages/",40],["templates/",130],["index.md",225],["log.md",315],["cache/",395],["raw/",475]].map(([l,x])=>
<React.Fragment key={l}><rect x={x} y="392" width={80} height="20" rx="4" fill="#fff" stroke="#fde047"/>
<text x={x+40} y="406" textAnchor="middle" fontSize="10" fill="#854d0e">{l}</text></React.Fragment>)}
</g>
<line x1="410" y1="418" x2="410" y2="436" stroke="#a8a29e" strokeWidth="1.5" markerEnd="url(#arrow)" style={{opacity:connOp('data','external'), transition:'opacity 0.2s'}}/>
{/* EXTERNAL */}
<g className="arch-layer" onMouseEnter={()=>setHoveredLayer('external')} onMouseLeave={()=>setHoveredLayer(null)}>
<rect x="20" y="436" width="780" height="36" rx="8" fill="#fdf2f8" stroke="#f9a8d4" strokeWidth={sw('external')} style={{filter:glow('external')}}/>
<text x="40" y="459" fontSize="10" fontWeight="600" fill="#9d174d" letterSpacing=".06em">EXTERNAL</text>
<text x="140" y="459" fontSize="10" fill="#be185d">Jina Reader · Context7 (optional) · WebSearch (built-in)</text>
</g>
<defs><marker id="arrow" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#a8a29e"/></marker></defs>
</svg>
<p style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'8px', textAlign:'center'}}>Hover over each layer to highlight its connections</p>
</div>;
}
// Agent Network Graph with animated connections
function AgentNetworkGraph() {
const [hoveredAgent, setHoveredAgent] = useState(null);
const agents = [
{name:"wiki-writer", x:150, y:80, color:"#0f766e"},
{name:"wiki-reader", x:350, y:80, color:"#0284c7"},
{name:"search-orch.", x:550, y:80, color:"#7c3aed"},
{name:"research-loop", x:100, y:200, color:"#9333ea"},
{name:"search-channel", x:350, y:200, color:"#6366f1"},
{name:"research-proc.", x:600, y:200, color:"#a855f7"},
{name:"fact-checker", x:200, y:320, color:"#dc2626"},
{name:"citation-expl.", x:500, y:320, color:"#0891b2"},
];
const connections = [
["research-loop", "search-orch."],
["search-orch.", "search-channel"],
["search-channel", "research-proc."],
["research-proc.", "wiki-writer"],
["wiki-writer", "wiki-reader"],
["search-orch.", "fact-checker"],
["research-proc.", "citation-expl."],
];
const getAgent = name => agents.find(a => a.name === name);
return <div className="diagram">
<svg width="700" height="420" viewBox="0 0 700 420" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="350" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">Agent Communication Network</text>
{connections.map((conn, i) => {
const from = getAgent(conn[0]);
const to = getAgent(conn[1]);
const highlighted = hoveredAgent && (hoveredAgent === conn[0] || hoveredAgent === conn[1]);
return (
<line key={`line-${i}`} x1={from.x} y1={from.y} x2={to.x} y2={to.y}
stroke={highlighted ? from.color : '#d1d5db'} strokeWidth={highlighted ? 2.5 : 1.5}
strokeDasharray="5,5" style={{transition:'all 0.2s', opacity: highlighted ? 1 : 0.5}}
markerEnd={highlighted ? `url(#arrow-${i})` : undefined}/>
);
})}
{agents.map((agent, i) => (
<g key={agent.name} className="network-node"
onMouseEnter={() => setHoveredAgent(agent.name)}
onMouseLeave={() => setHoveredAgent(null)}>
<circle cx={agent.x} cy={agent.y} r={hoveredAgent === agent.name ? 28 : 22}
fill={agent.color} opacity={hoveredAgent === agent.name ? 1 : 0.85}
style={{filter: hoveredAgent === agent.name ? 'drop-shadow(0 0 8px rgba(0,0,0,0.2))' : 'none', transition:'all 0.2s'}}/>
<text x={agent.x} y={agent.y} textAnchor="middle" dominantBaseline="middle"
fontSize="10" fontWeight="600" fill="#fff">{agent.name}</text>
</g>
))}
{connections.map((conn, i) => (
<defs key={`marker-${i}`}>
<marker id={`arrow-${i}`} viewBox="0 0 10 10" refX="10" refY="5" markerWidth="4" markerHeight="4" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill={getAgent(conn[0]).color}/>
</marker>
</defs>
))}
</svg>
<div style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'12px'}}>
<strong>Legend:</strong> Hover over an agent to highlight its connections. Teal=CRUD, Purple=Research, Red/Blue=Quality
</div>
</div>;
}
// Research Pipeline Animated Flowchart
function ResearchPipeline() {
const [activeStep, setActiveStep] = useState(0);
useEffect(() => {
const interval = setInterval(() => {
setActiveStep(s => (s + 1) % 10);
}, 900);
return () => clearInterval(interval);
}, []);
// Layout: row 1 is linear, row 2 is the fan-out, row 3 continues after merge
// Row 1: Question -> Wiki Check -> Cache Check -> Search Orch.
// Row 2 (fan-out): |-> Web
// |-> Docs
// Row 3: Merge <- -----+
// Row 3 continued: Merge -> Dedup -> Fact Check -> Ingest
const boxW = 82, boxH = 36, gap = 14;
const row1Y = 50, row2Y = 120, row3Y = 190;
const nodes = [
{label:"Question", time:"", x:30, y:row1Y, step:0},
{label:"Wiki Check", time:"~0.5s",x:30+1*(boxW+gap), y:row1Y, step:1},
{label:"Cache Check", time:"~0.2s",x:30+2*(boxW+gap), y:row1Y, step:2},
{label:"Search Orch.", time:"~1s", x:30+3*(boxW+gap), y:row1Y, step:3},
// fan-out
{label:"Web Search", time:"~2s", x:30+2*(boxW+gap), y:row2Y, step:4},
{label:"Doc Search", time:"~2s", x:30+4*(boxW+gap), y:row2Y, step:4},
// merge row
{label:"Merge", time:"~0.5s",x:30+3*(boxW+gap), y:row3Y, step:5},
{label:"Dedup", time:"~0.3s",x:30+4*(boxW+gap), y:row3Y, step:6},
{label:"Fact Check", time:"~3s", x:30+5*(boxW+gap), y:row3Y, step:7},
{label:"Wiki Ingest", time:"", x:30+6*(boxW+gap), y:row3Y, step:8},
];
// Arrows: [fromIdx, toIdx]
const arrows = [
[0,1],[1,2],[2,3], // row 1 linear
[3,4],[3,5], // fan-out down
[4,6],[5,6], // converge to merge
[6,7],[7,8],[8,9], // row 3 linear
];
function boxCenter(n) { return {cx: n.x + boxW/2, cy: n.y + boxH/2}; }
return <div className="diagram" style={{overflowX:'auto'}}>
<svg width="720" height="260" viewBox="0 0 720 260" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="360" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">Research Engine Pipeline</text>
<defs>
<marker id="arrowSmall" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill="#0f766e"/>
</marker>
<marker id="arrowGray" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill="#a8a29e"/>
</marker>
</defs>
{arrows.map(([fi,ti], idx) => {
const f = nodes[fi], t = nodes[ti];
const fc = boxCenter(f), tc = boxCenter(t);
const lit = activeStep >= f.step && activeStep >= t.step;
// straight or vertical connection?
const sameRow = f.y === t.y;
if (sameRow) {
const x1 = f.x + boxW, y1 = fc.cy, x2 = t.x, y2 = tc.cy;
return <line key={idx} x1={x1} y1={y1} x2={x2} y2={y2}
stroke={lit ? '#0f766e' : '#d1d5db'} strokeWidth={lit ? 2 : 1.5}
markerEnd={lit ? 'url(#arrowSmall)' : 'url(#arrowGray)'}
style={{transition:'all 0.3s'}}/>;
}
// vertical / diagonal
return <path key={idx}
d={`M ${fc.cx} ${f.y + boxH} L ${tc.cx} ${t.y}`}
stroke={lit ? '#0f766e' : '#d1d5db'} strokeWidth={lit ? 2 : 1.5} fill="none"
markerEnd={lit ? 'url(#arrowSmall)' : 'url(#arrowGray)'}
style={{transition:'all 0.3s'}}/>;
})}
{nodes.map((n, i) => {
const lit = activeStep >= n.step;
return <g key={i}>
<rect x={n.x} y={n.y} width={boxW} height={boxH} rx="6"
fill={lit ? '#0f766e' : '#f5f5f4'} stroke={lit ? '#0d6963' : '#d1d5db'} strokeWidth={lit ? 2 : 1.5}
style={{transition:'all 0.3s', filter: activeStep === n.step ? 'drop-shadow(0 0 6px rgba(15,118,110,0.45))' : 'none'}}/>
<text x={n.x + boxW/2} y={n.y + (n.time ? 13 : 18)} textAnchor="middle" dominantBaseline="middle"
fontSize="10.5" fontWeight="600" fill={lit ? '#fff' : '#78716c'}
style={{transition:'fill 0.3s'}}>{n.label}</text>
{n.time && <text x={n.x + boxW/2} y={n.y + 27} textAnchor="middle" dominantBaseline="middle"
fontSize="8.5" fill={lit ? 'rgba(255,255,255,0.75)' : '#a8a29e'}
style={{transition:'fill 0.3s'}}>{n.time}</text>}
</g>;
})}
{/* Parallel bracket annotation */}
<text x={30+3*(boxW+gap)+boxW/2} y={row2Y - 8} textAnchor="middle" fontSize="9" fill="#7c3aed" fontWeight="600">parallel</text>
</svg>
<p style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'8px', textAlign:'center'}}>Steps light up sequentially. Search Orchestrator fans out to Web + Docs in parallel, then results merge.</p>
</div>;
}
// Freshness Tiers Timeline
function FreshnessTiers() {
const [hoveredTier, setHoveredTier] = useState(null);
const tiers = [
{name:"live", ttl:"15min", examples:"Stock prices, live weather", color:"#ef4444"},
{name:"hot", ttl:"1hour", examples:"News, trending topics", color:"#f97316"},
{name:"warm", ttl:"6hours", examples:"Blog posts, releases", color:"#eab308"},
{name:"fresh", ttl:"1day", examples:"Research papers, docs", color:"#84cc16"},
{name:"active", ttl:"7days", examples:"Tutorials, guides", color:"#22c55e"},
{name:"stable", ttl:"30days", examples:"Reference docs", color:"#10b981"},
{name:"legacy", ttl:"90days", examples:"Historical content", color:"#06b6d4"},
{name:"archive", ttl:"1year", examples:"Archived articles", color:"#0284c7"},
{name:"permanent", ttl:"never", examples:"Core concepts", color:"#6366f1"},
];
return <div className="diagram">
<svg width="800" height="200" viewBox="0 0 800 200" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="400" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">Content Freshness Tiers</text>
{tiers.map((tier, i) => {
const width = Math.max(60, 80 - (i * 4));
const x = 30 + (i * 85);
const isHovered = hoveredTier === tier.name;
return (
<g key={tier.name} className="freshness-tier"
onMouseEnter={() => setHoveredTier(tier.name)}
onMouseLeave={() => setHoveredTier(null)}>
<rect x={x} y="60" width={width} height="80" rx="4" fill={tier.color}
opacity={isHovered ? 1 : 0.7} style={{transition:'all 0.2s'}}/>
<text x={x + width/2} y="100" textAnchor="middle" dominantBaseline="middle"
fontSize="10" fontWeight="600" fill="#fff">{tier.name}</text>
<text x={x + width/2} y="118" textAnchor="middle" dominantBaseline="middle"
fontSize="8" fill="#fff">{tier.ttl}</text>
{isHovered && (
<foreignObject x={x - 60} y="30" width="180" height="60">
<div style={{fontSize:'11px', color:'var(--text)', background:'var(--bg-card)', padding:'8px', borderRadius:'4px', border:'1px solid var(--border)', textAlign:'center'}}>
<strong>{tier.name.toUpperCase()}</strong><br/>{tier.examples}
</div>
</foreignObject>
)}
</g>
);
})}
</svg>
<p style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'12px', textAlign:'center'}}>Hover over each tier to see examples. Width represents relative TTL on a log scale.</p>
</div>;
}
// Circuit Breaker State Machine
function CircuitBreaker() {
const [state, setState] = useState("closed");
const states = [
{name:"Closed", color:"#22c55e", desc:"Normal operation"},
{name:"Open", color:"#ef4444", desc:"Failures exceeded"},
{name:"Half-Open", color:"#eab308", desc:"Testing recovery"},
];
const transitions = [
{from:"Closed", to:"Open", label:"5 failures"},
{from:"Open", to:"Half-Open", label:"300s timeout"},
{from:"Half-Open", to:"Closed", label:"3 successes"},
{from:"Half-Open", to:"Open", label:"1 failure"},
];
return <div className="diagram">
<svg width="700" height="350" viewBox="0 0 700 350" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="350" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">Circuit Breaker State Machine</text>
{states.map((s, i) => {
const x = 100 + (i * 250);
const y = 150;
const isActive = state === s.name.toLowerCase();
return (
<g key={s.name} onClick={() => {
const nextState = state === "closed" ? "open" : state === "open" ? "half-open" : "closed";
setState(nextState);
}} style={{cursor:'pointer'}}>
<circle cx={x} cy={y} r={isActive ? 50 : 40}
fill={s.color} opacity={isActive ? 1 : 0.6}
className={isActive ? "circuit-state pulse" : "circuit-state"}
style={{transition:'all 0.3s'}}/>
<text x={x} y={y - 8} textAnchor="middle" dominantBaseline="middle"
fontSize="13" fontWeight="700" fill="#fff">{s.name}</text>
<text x={x} y={y + 15} textAnchor="middle" dominantBaseline="middle"
fontSize="11" fill="#fff">{s.desc}</text>
</g>
);
})}
{transitions.map((t, i) => {
const fromIdx = states.findIndex(s => s.name === t.from);
const toIdx = states.findIndex(s => s.name === t.to);
const fromX = 100 + (fromIdx * 250);
const toX = 100 + (toIdx * 250);
const y = 150;
const offsetY = 20 + (i * 15);
return (
<g key={`${t.from}-${t.to}`}>
<path d={`M ${fromX + 40} ${y - 20} Q ${(fromX + toX)/2} ${y - offsetY} ${toX - 40} ${y - 20}`}
stroke="#a8a29e" strokeWidth="2" fill="none" markerEnd="url(#arrowTrans)"/>
<text x={(fromX + toX)/2} y={y - offsetY - 8} textAnchor="middle"
fontSize="10" fill="#1c1917" fontWeight="500">{t.label}</text>
</g>
);
})}
<defs><marker id="arrowTrans" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#a8a29e"/></marker></defs>
</svg>
<p style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'12px', textAlign:'center'}}>Click any state to cycle through transitions</p>
</div>;
}
// Interactive Stats Dashboard
function StatsDashboard() {
const [animateIn, setAnimateIn] = useState(false);
const containerRef = useRef(null);
useEffect(() => {
const observer = new IntersectionObserver(entries => {
if (entries[0].isIntersecting) setAnimateIn(true);
}, {threshold:0.3});
if (containerRef.current) observer.observe(containerRef.current);
return () => observer.disconnect();
}, []);
const stats = [
{label:"Total Pages", value: animateIn ? 342 : 0},
{label:"Links", value: animateIn ? 1247 : 0},
{label:"Sources", value: animateIn ? 89 : 0},
];
return <div ref={containerRef} className="diagram">
<div style={{display:'grid', gridTemplateColumns:'repeat(3, 1fr)', gap:'20px', marginBottom:'24px'}}>
{stats.map((stat, i) => (
<div key={i} style={{textAlign:'center'}}>
<div style={{fontSize:'32px', fontWeight:'700', color:'var(--accent)', fontFamily:"'IBM Plex Mono', monospace"}} className="stats-counter">
{stat.value}
</div>
<div style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'8px'}}>{stat.label}</div>
</div>
))}
</div>
<svg width="100%" height="180" viewBox="0 0 700 180" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="350" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">Page Type Distribution</text>
{[{type:"Concept", count:120, color:"#0f766e"},
{type:"Idea", count:89, color:"#0284c7"},
{type:"Reference", count:67, color:"#ea580c"},
{type:"Status", count:45, color:"#16a34a"},
{type:"Other", count:21, color:"#a8a29e"}].map((pt, i) => {
const barWidth = (pt.count / 120) * 200;
return (
<g key={pt.type}>
<rect x="50" y={50 + i*22} width={barWidth} height="18" rx="3" fill={pt.color} opacity={animateIn ? 0.8 : 0.2}
style={{transition:'width 0.8s ease-out'}}/>
<text x="260" y={63 + i*22} fontSize="12" fill="var(--text)" fontWeight="500">{pt.type} ({pt.count})</text>
</g>
);
})}
</svg>
</div>;
}
// Wiki Link Visualizer
function WikiLinkVisualizer() {
const [hoveredPage, setHoveredPage] = useState(null);
const pages = [
{id:"transformers", label:"Transformers", x:150, y:100},
{id:"attention", label:"Attention", x:450, y:100},
{id:"rlhf", label:"RLHF", x:300, y:280},
{id:"scaling", label:"Scaling Laws", x:550, y:280},
];
const links = [
{from:"transformers", to:"attention"},
{from:"attention", to:"transformers"},
{from:"transformers", to:"rlhf"},
{from:"rlhf", to:"scaling"},
{from:"scaling", to:"attention"},
];
return <div className="diagram">
<svg width="700" height="380" viewBox="0 0 700 380" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="350" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">Wiki Link Graph Demo</text>
{links.map((link, i) => {
const fromPage = pages.find(p => p.id === link.from);
const toPage = pages.find(p => p.id === link.to);
const isHighlighted = hoveredPage && (hoveredPage === link.from || hoveredPage === link.to);
return (
<line key={`link-${i}`} x1={fromPage.x} y1={fromPage.y} x2={toPage.x} y2={toPage.y}
stroke={isHighlighted ? '#0f766e' : '#d1d5db'} strokeWidth={isHighlighted ? 2 : 1}
style={{transition:'all 0.2s', opacity: isHighlighted ? 1 : 0.4}}
markerEnd={isHighlighted ? 'url(#arrowLink)' : undefined}/>
);
})}
{pages.map(page => {
const isHovered = hoveredPage === page.id;
const hasIncoming = links.some(l => l.to === page.id && hoveredPage === page.id);
const hasOutgoing = links.some(l => l.from === page.id && hoveredPage === page.id);
return (
<g key={page.id} onMouseEnter={() => setHoveredPage(page.id)} onMouseLeave={() => setHoveredPage(null)}>
<rect x={page.x - 50} y={page.y - 25} width="100" height="50" rx="6"
fill={isHovered ? '#0f766e' : '#f5f5f4'} stroke={isHovered ? '#0f766e' : '#e7e5e4'} strokeWidth={isHovered ? 2 : 1}
style={{cursor:'pointer', transition:'all 0.2s'}}/>
<text x={page.x} y={page.y} textAnchor="middle" dominantBaseline="middle"
fontSize="12" fontWeight="600" fill={isHovered ? '#fff' : '#1c1917'}>{page.label}</text>
</g>
);
})}
<defs><marker id="arrowLink" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="4" markerHeight="4" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#0f766e"/></marker></defs>
</svg>
<p style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'12px', textAlign:'center'}}>Hover over pages to see incoming and outgoing links highlighted</p>
</div>;
}
function SearchPipelineDiagram() {
const [hoveredStep, setHoveredStep] = useState(null);
return <div className="diagram">
<svg width="800" height="260" viewBox="0 0 800 260" style={{fontFamily:'IBM Plex Sans,sans-serif'}}>
<text x="400" y="24" textAnchor="middle" fontSize="14" fontWeight="700" fill="#1c1917">Enhanced Search Pipeline</text>
{[
{label:"Query", x:50, icon:"❓"},
{label:"Tokenize", x:130, icon:"🔤"},
{label:"Stop Words", x:210, icon:"✂️"},
{label:"TF-IDF", x:310, icon:"⚖️"},
{label:"Title Boost", x:400, icon:"📌"},
{label:"Para Boost", x:500, icon:"📄"},
{label:"Rank", x:600, icon:"🏆"},
{label:"Snippets", x:700, icon:"✨"},
].map((step, i) => {
const isHovered = hoveredStep === i;
return (
<g key={i} onMouseEnter={() => setHoveredStep(i)} onMouseLeave={() => setHoveredStep(null)}>
<circle cx={step.x} cy="100" r={isHovered ? 28 : 20}
fill={isHovered ? '#0f766e' : '#f5f5f4'} stroke={isHovered ? '#0f766e' : '#e7e5e4'} strokeWidth="2"
style={{cursor:'pointer', transition:'all 0.2s', filter: isHovered ? 'drop-shadow(0 0 6px rgba(15, 118, 110, 0.4))' : 'none'}}/>
<text x={step.x} y="95" textAnchor="middle" fontSize="16">{step.icon}</text>
<text x={step.x} y="140" textAnchor="middle" fontSize="10" fontWeight="600" fill="var(--text)">{step.label}</text>
{i < 7 && <line x1={step.x + 20} y1="100" x2={[130,210,310,400,500,600,700][i] - 20} y2="100"
stroke={isHovered || hoveredStep === i + 1 ? '#0f766e' : '#d1d5db'} strokeWidth="2"
markerEnd={isHovered || hoveredStep === i + 1 ? 'url(#arrowPipe)' : undefined}
style={{transition:'all 0.2s'}}/>}
</g>
);
})}
<defs><marker id="arrowPipe" viewBox="0 0 10 10" refX="10" refY="5" markerWidth="4" markerHeight="4" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#0f766e"/></marker></defs>
</svg>
<p style={{fontSize:'13px', color:'var(--text-muted)', marginTop:'12px', textAlign:'center'}}>Hover over steps to highlight the data flow</p>
</div>;
}
function App() {
const [active, setActive] = useState("overview");
const [sidebarOpen, setSidebarOpen] = useState(false);
const [searchTerm, setSearchTerm] = useState("");
const [skillTab, setSkillTab] = useState(0);
const [depFilter, setDepFilter] = useState("all");
const scrollTo = useCallback((id) => { setActive(id); setSidebarOpen(false); document.getElementById(id)?.scrollIntoView({behavior:'smooth'}); },[]);
useEffect(() => {
const observer = new IntersectionObserver((entries) => {
entries.forEach(e => { if(e.isIntersecting) setActive(e.target.id); });
}, {rootMargin:'-80px 0px -60% 0px'});
NAV.forEach(g => g.items.forEach(i => { const el = document.getElementById(i.id); if(el) observer.observe(el); }));
return () => observer.disconnect();
},[]);
const filteredDeps = depFilter === "all" ? EXTERNAL_DEPS : EXTERNAL_DEPS.filter(d => d.type === depFilter);
return <>
<header className="header">
<button className="mobile-toggle" onClick={()=>setSidebarOpen(!sidebarOpen)}><span className="nav-icon">{Icons.menu}</span></button>
<span className="header-logo">LLM-Wiki <span>Guide</span></span>
<span className="header-badge">v1.0.0</span>
<div className="header-right">
<a href="https://github.com/Oshayr/llm-wiki" target="_blank" rel="noopener">GitHub</a>
<span className="version-tag">April 2026</span>
</div>
</header>
<nav className={`sidebar ${sidebarOpen?'open':''}`}>
{NAV.map(g => <div className="nav-section" key={g.group}>
<div className="nav-section-label">{g.group}</div>
{g.items.map(i => <a key={i.id} className={`nav-item ${active===i.id?'active':''}`} onClick={()=>scrollTo(i.id)}>
<span className="nav-icon">{Icons[i.icon]}</span> {i.label}
</a>)}
</div>)}
<div style={{padding:'16px',borderTop:'1px solid var(--border)',marginTop:12}}>
<div style={{fontSize:11,color:'var(--text-light)'}}>Built by <strong style={{color:'var(--text-muted)'}}>Oshayr</strong></div>
<div style={{fontSize:10,color:'var(--text-light)',marginTop:2}}>MIT License</div>
</div>
</nav>
<main className="main">
{/* OVERVIEW */}
<section id="overview">
<h1 className="section-title">LLM-Wiki</h1>
<p className="section-subtitle">LLM-powered personal wiki for Claude Code. Autonomous knowledge base with full-text search, web research, and a Wikipedia-style web UI.</p>
<div className="card">
<div className="card-header"><div className="card-icon" style={{background:'#f0fdf4'}}>📖</div><div><div className="card-title">The Karpathy Pattern</div></div></div>
<div className="card-desc">
<p>LLM-Wiki implements Andrej Karpathy's LLM Wiki pattern. Instead of traditional RAG where the LLM rediscovers knowledge from raw documents on every query, the LLM pre-compiles source materials into a structured, interlinked wiki of markdown files. Raw sources remain immutable in <code>raw/</code>, the LLM maintains the wiki layer in <code>pages/</code>, and a schema governs quality standards. Knowledge compounds over time.</p>
<br/><p>Every claim traces back to a specific <code>.md</code> file that can be read, edited, or deleted. The wiki is compatible with Obsidian — open <code>.wiki/</code> as a vault for graph visualization and editing.</p>
</div>
</div>
<h3 style={{marginTop:24,marginBottom:12}}>How It Works</h3>
<div className="grid-2">
<div className="card"><strong>1. You work normally</strong><p className="card-desc" style={{marginTop:4}}>Claude saves relevant knowledge to the wiki automatically as you research, discuss, and build.</p></div>
<div className="card"><strong>2. Wiki grows</strong><p className="card-desc" style={{marginTop:4}}>Research findings, ideas, decisions, and patterns accumulate as interlinked pages with confidence levels and source citations.</p></div>
<div className="card"><strong>3. Wiki serves you</strong><p className="card-desc" style={{marginTop:4}}>Claude checks the wiki first when you ask questions, citing existing knowledge with <code>[[slug]]</code> references before searching the web.</p></div>
<div className="card"><strong>4. Wiki maintains itself</strong><p className="card-desc" style={{marginTop:4}}>Periodic lint, deduplication, confidence upgrades, stale detection, and gap analysis keep the knowledge base healthy.</p></div>
</div>
<h3 style={{marginTop:24,marginBottom:12}}>Core Capabilities</h3>
<div className="grid-2">
<div className="card">
<div className="card-header"><div className="card-icon" style={{background:'#f0fdf4'}}>🧠</div><div className="card-title">Knowledge Management</div></div>
<div className="card-desc">
<ul style={{marginLeft:16,lineHeight:1.7}}>
<li><strong>Auto-capture</strong> — saves research, ideas, decisions as you work</li>
<li><strong>TF-IDF search</strong> — full-text search with content-aware scoring</li>
<li><strong>Wiki-links</strong> — <code>[[slug]]</code> references with bidirectional backlinks</li>
<li><strong>Block references</strong> — <code>[[slug#heading]]</code> section links</li>
<li><strong>Frontmatter queries</strong> — Dataview-like metadata queries</li>
<li><strong>10 page types</strong> — concept, idea, brainstorming, status, rules, config, skill, memory, reference, custom</li>
</ul>
</div>
</div>
<div className="card">
<div className="card-header"><div className="card-icon" style={{background:'#eff6ff'}}>🔬</div><div className="card-title">Research-on-Miss</div></div>
<div className="card-desc">
<ul style={{marginLeft:16,lineHeight:1.7}}>
<li><strong>Wiki-first retrieval</strong> — checks wiki before web search</li>
<li><strong>Automatic research</strong> — researches and ingests when knowledge is missing</li>
<li><strong>Tool discovery</strong> — works with available tools (WebSearch, MCP, Context7)</li>
<li><strong>Multi-channel</strong> — web, academic, code, docs search channels</li>
<li><strong>Fact-checking</strong> — verifies claims against external sources</li>
<li><strong>Citation explorer</strong> — snowballs through academic citation graphs</li>
</ul>
</div>
</div>
<div className="card">
<div className="card-header"><div className="card-icon" style={{background:'#fef3c7'}}>🌐</div><div className="card-title">Web UI</div></div>
<div className="card-desc">
<ul style={{marginLeft:16,lineHeight:1.7}}>
<li><strong>4 themes</strong> — light, dark, terminal, wikipedia</li>
<li><strong>Knowledge graph</strong> — interactive Cytoscape.js visualization</li>
<li><strong>Canvas view</strong> — spatial whiteboard for page arrangement</li>
<li><strong>Split editor</strong> — live markdown preview with AI assist</li>
<li><strong>WebSocket chat</strong> — RAG-augmented Q&A sidebar</li>
<li><strong>FSRS review</strong> — spaced repetition flashcards</li>
</ul>
</div>
</div>
<div className="card">
<div className="card-header"><div className="card-icon" style={{background:'#f0f9ff'}}>🔧</div><div className="card-title">Self-Maintenance</div></div>
<div className="card-desc">
<ul style={{marginLeft:16,lineHeight:1.7}}>
<li><strong>Auto-lint</strong> — fixes broken links, missing frontmatter</li>
<li><strong>Deduplication</strong> — merges near-duplicate pages</li>
<li><strong>Confidence upgrades</strong> — promotes pages as sources accumulate</li>
<li><strong>Stale detection</strong> — 9-tier freshness tier system</li>
<li><strong>Gap analysis</strong> — identifies missing coverage</li>
<li><strong>Structured logging</strong> — configurable JSON/text output</li>
</ul>
</div>
</div>
</div>
</section>
{/* ARCHITECTURE */}
<section id="architecture">
<h1 className="section-title">System Architecture</h1>
<p className="section-subtitle">Complete view of the LLM-Wiki stack and how components interact.</p>
<ArchDiagram/>
<h3 style={{marginTop:24,marginBottom:16}}>Key Components</h3>
<div className="grid-2">
<Expandable title="User Layer">
<p style={{fontSize:'13px', marginBottom:8}}>Five ways to interact with LLM-Wiki:</p>
<ul style={{fontSize:'13px', marginLeft:16, marginBottom:8}}>
<li><strong>Claude Code:</strong> Slash commands (/wiki-write, /wiki-read, etc.)</li>
<li><strong>CLI:</strong> Direct Python script execution with full control</li>
<li><strong>Web UI:</strong> Graph, editor, chat, review interface at localhost:8420</li>
<li><strong>MCP:</strong> Any MCP-compatible client querying the wiki</li>
<li><strong>Obsidian:</strong> Open .wiki/ vault for graph and manual editing</li>
</ul>
</Expandable>
<Expandable title="Agent Layer">
<p style={{fontSize:'13px', marginBottom:8}}>10 autonomous agents orchestrating knowledge work:</p>
<ul style={{fontSize:'13px', marginLeft:16, marginBottom:8}}>
<li>CRUD ops (wiki-writer, wiki-reader, wiki-auditor, backlink-manager)</li>
<li>Research ops (search-orchestrator, search-channel, research-loop, research-processor)</li>
<li>Quality ops (fact-checker, citation-explorer)</li>
</ul>
</Expandable>