-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlegionis-platform-blueprint.html
More file actions
2277 lines (2145 loc) · 132 KB
/
legionis-platform-blueprint.html
File metadata and controls
2277 lines (2145 loc) · 132 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>Legionis Platform Blueprint — Full Presentation</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='6' fill='%230D1117'/><text x='8' y='24' font-family='system-ui' font-weight='700' font-size='22' fill='%23d97706'>L</text></svg>">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--obsidian: #0D1117;
--card: #161B22;
--border: #292524;
--amber: #d97706;
--gold: #f59e0b;
--warm-white: #fafaf9;
--stone-400: #a8a29e;
--stone-500: #78716c;
--stone-600: #57534e;
--cyan: #22D3EE;
--green: #22c55e;
--red: #ef4444;
--yellow: #eab308;
--blue: #3b82f6;
--purple: #a855f7;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--obsidian);
color: var(--warm-white);
font-family: 'Inter', -apple-system, sans-serif;
overflow: hidden;
height: 100vh;
width: 100vw;
}
.slide {
display: none;
width: 100vw;
height: 100vh;
padding: 48px 64px;
flex-direction: column;
justify-content: flex-start;
overflow-y: auto;
}
.slide.active { display: flex; }
.slide-number {
position: fixed;
bottom: 16px;
right: 24px;
color: var(--stone-600);
font-size: 12px;
font-family: 'JetBrains Mono', monospace;
z-index: 100;
}
.nav-hint {
position: fixed;
bottom: 16px;
left: 24px;
color: var(--stone-600);
font-size: 11px;
z-index: 100;
}
h1 {
font-family: 'Space Grotesk', sans-serif;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.2;
}
h2 {
font-family: 'Space Grotesk', sans-serif;
font-weight: 600;
letter-spacing: -0.01em;
line-height: 1.3;
}
h3 {
font-family: 'Space Grotesk', sans-serif;
font-weight: 600;
font-size: 1rem;
}
.badge {
display: inline-block;
padding: 3px 12px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.06em;
}
.badge-amber { background: rgba(217, 119, 6, 0.15); color: var(--amber); }
.badge-green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-cyan { background: rgba(34, 211, 238, 0.15); color: var(--cyan); }
.badge-red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-yellow { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.subtitle {
color: var(--stone-400);
font-size: 1.1rem;
margin-top: 8px;
}
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 10px;
padding: 20px 24px;
}
.card-accent {
border-left: 3px solid var(--amber);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 14px; }
.usp-num {
display: inline-block;
background: rgba(217, 119, 6, 0.15);
color: var(--amber);
padding: 2px 10px;
border-radius: 8px;
font-size: 0.7rem;
font-weight: 600;
margin-bottom: 8px;
}
.usp-title {
font-family: 'Space Grotesk', sans-serif;
font-size: 1rem;
font-weight: 600;
color: var(--amber);
margin-bottom: 4px;
}
.usp-desc {
color: var(--stone-400);
font-size: 0.85rem;
line-height: 1.5;
}
.stat { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--amber); }
.stat-label { color: var(--stone-400); font-size: 0.85rem; margin-top: 2px; }
code, .mono {
font-family: 'JetBrains Mono', monospace;
font-size: 0.85em;
background: rgba(255,255,255,0.05);
padding: 2px 6px;
border-radius: 4px;
}
.code-block {
font-family: 'JetBrains Mono', monospace;
font-size: 0.78rem;
background: #0D1117;
border: 1px solid var(--border);
border-radius: 8px;
padding: 16px;
line-height: 1.6;
overflow-x: auto;
color: var(--stone-400);
}
.code-block .kw { color: #c678dd; }
.code-block .fn { color: #61afef; }
.code-block .str { color: #98c379; }
.code-block .cmt { color: #5c6370; font-style: italic; }
.code-block .num { color: var(--amber); }
.status-dot {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 6px;
vertical-align: middle;
}
.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--red); opacity: 0.7; }
.dot-blue { background: var(--blue); }
.progress-bar-bg {
background: var(--border);
border-radius: 8px;
height: 16px;
overflow: hidden;
}
.progress-bar-fill {
background: var(--green);
height: 100%;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.65rem;
font-weight: 700;
color: var(--obsidian);
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.85rem;
}
th {
text-align: left;
color: var(--amber);
font-family: 'Space Grotesk', sans-serif;
font-weight: 600;
padding: 8px 12px;
border-bottom: 1px solid var(--border);
font-size: 0.8rem;
}
td {
padding: 6px 12px;
border-bottom: 1px solid rgba(41,37,36,0.5);
color: var(--stone-400);
vertical-align: top;
}
td:first-child { color: var(--warm-white); }
.team-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 4px;
font-size: 0.78rem;
font-weight: 500;
}
.layer-header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
}
.layer-header h2 { font-size: 1.6rem; }
.divider {
height: 1px;
background: var(--border);
margin: 16px 0;
}
.arrow { color: var(--amber); margin: 0 8px; }
.todo-item {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 6px 0;
color: var(--stone-400);
font-size: 0.85rem;
}
.todo-check {
width: 16px;
height: 16px;
border: 1.5px solid var(--border);
border-radius: 3px;
flex-shrink: 0;
margin-top: 2px;
}
.todo-done {
background: var(--green);
border-color: var(--green);
}
/* Title slide special */
.title-slide {
justify-content: center;
align-items: center;
text-align: center;
}
.title-slide h1 { font-size: 3rem; margin-bottom: 12px; }
.title-slide .subtitle { font-size: 1.3rem; }
.flex-grow { flex: 1; }
.mt-auto { margin-top: auto; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-amber { color: var(--amber); }
.text-stone { color: var(--stone-400); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-purple { color: var(--purple); }
.fw-600 { font-weight: 600; }
.tier-passive { color: var(--green); }
.tier-active { color: var(--yellow); }
.tier-sensitive { color: var(--red); }
</style>
</head>
<body>
<!-- ============================================================ -->
<!-- SLIDE 1: TITLE -->
<!-- ============================================================ -->
<div class="slide title-slide" id="s1">
<span class="badge badge-amber" style="margin-bottom: 20px;">PLATFORM ARCHITECTURE</span>
<h1>Legionis Platform Blueprint</h1>
<p class="subtitle">Many acting as one. Five layers. Hub-and-spoke orchestration. Full data ownership.</p>
<p style="color: var(--stone-500); margin-top: 20px; font-size: 0.9rem;">Communication Layer orchestrates Context + Agents. Agents use Compute. Results flow back through Communication.</p>
<div style="margin-top: 32px; display: flex; gap: 40px; justify-content: center;">
<div style="text-align: center;"><div class="stat" style="font-size: 1.5rem;">82</div><div class="stat-label">Agents</div></div>
<div style="text-align: center;"><div class="stat" style="font-size: 1.5rem;">11</div><div class="stat-label">Teams</div></div>
<div style="text-align: center;"><div class="stat" style="font-size: 1.5rem;">32</div><div class="stat-label">DB Tables</div></div>
<div style="text-align: center;"><div class="stat" style="font-size: 1.5rem;">35+</div><div class="stat-label">Analytics Events</div></div>
</div>
<p style="color: var(--stone-600); margin-top: 16px; font-size: 0.85rem;">March 2026 · legionis.ai · v7.0 (Multi-Instance & Director Evolution)</p>
</div>
<!-- ============================================================ -->
<!-- SLIDE 2: USPs OVERVIEW -->
<!-- ============================================================ -->
<div class="slide" id="s2">
<span class="badge badge-amber mb-4">SIX DIFFERENTIATORS</span>
<h2 style="font-size: 1.8rem;" class="mb-6">What Makes Legionis Different</h2>
<div class="grid-3 gap-4">
<div class="card">
<span class="usp-num">USP #1</span>
<div class="usp-title">Cloud Storage Connectivity</div>
<div class="usp-desc">Agents read from and write to the user's own Google Drive or OneDrive. Deliverables live where work lives, not in a walled garden.</div>
</div>
<div class="card">
<span class="usp-num">USP #2</span>
<div class="usp-title">Bring Your Own Tokens</div>
<div class="usp-desc">Connect your own Anthropic, OpenAI, or Google AI API keys. Zero markup, full cost transparency. Or use Legionis Tokens at 15% markup for convenience.</div>
</div>
<div class="card">
<span class="usp-num">USP #3</span>
<div class="usp-title">Modular Agent Provisioning</div>
<div class="usp-desc">82 agents across 11 domain teams. Acquire teams by department. Start with one, expand as needed. Pay for what you use.</div>
</div>
<div class="card">
<span class="usp-num">USP #4</span>
<div class="usp-title">Collaborative Architecture</div>
<div class="usp-desc">Agents consult, delegate, review, and debate. Gateway "meetings" produce multi-perspective synthesis, not single-agent output.</div>
</div>
<div class="card">
<span class="usp-num">USP #5</span>
<div class="usp-title">Organizational Memory</div>
<div class="usp-desc">Decisions, bets, feedback, learnings. Cross-referenced and compounding over time. Every decision informs the next.</div>
</div>
<div class="card" style="border-left: 3px solid var(--amber);">
<span class="usp-num">USP #6</span>
<div class="usp-title">Full Data Ownership</div>
<div class="usp-desc">The architectural principle spanning all layers. API tokens stay with the provider. Files stay in the user's cloud. Legionis never stores your data.</div>
</div>
</div>
<div style="margin-top: 24px; text-align: center; color: var(--stone-500); font-size: 0.85rem;">
These six differentiators form an interlocking flywheel. Each reinforces the others.
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 3: USPs -- THE FLYWHEEL -->
<!-- ============================================================ -->
<div class="slide" id="s3">
<span class="badge badge-amber mb-4">THE FLYWHEEL</span>
<h2 style="font-size: 1.6rem;" class="mb-6">USPs Reinforce Each Other</h2>
<div class="grid-2 gap-4">
<div class="card card-accent">
<h3 class="text-amber mb-4">How They Connect</h3>
<div class="text-sm text-stone" style="line-height: 2;">
<strong style="color: var(--warm-white);">BYOT</strong> enables <strong style="color: var(--warm-white);">Data Ownership</strong> — your keys, your costs, no lock-in<br>
<strong style="color: var(--warm-white);">Cloud Storage</strong> enables <strong style="color: var(--warm-white);">Org Memory</strong> — context lives in your cloud storage<br>
<strong style="color: var(--warm-white);">Org Memory</strong> enables <strong style="color: var(--warm-white);">Collaboration</strong> — agents share cross-referenced context<br>
<strong style="color: var(--warm-white);">Collaboration</strong> enables <strong style="color: var(--warm-white);">Modular Teams</strong> — agents that work together across domains<br>
<strong style="color: var(--warm-white);">Modular Teams</strong> enables <strong style="color: var(--warm-white);">BYOT</strong> — scale usage, control costs per team
</div>
</div>
<div class="card">
<h3 class="text-amber mb-4">Competitive Moat</h3>
<table>
<tr><td>ChatGPT / Claude.ai</td><td class="text-stone">No agents, no memory, no file ops</td></tr>
<tr><td>Custom GPTs</td><td class="text-stone">Single agent, no collaboration, no storage</td></tr>
<tr><td>AI Agent platforms</td><td class="text-stone">Vendor-hosted data, opaque pricing</td></tr>
<tr><td style="color: var(--amber);">Legionis</td><td style="color: var(--amber);">Full stack: agents + memory + multi-cloud storage + BYOT + integrations</td></tr>
</table>
<div class="divider"></div>
<div class="text-xs text-stone">Hard to replicate because it requires all six working together. Removing any one collapses the value proposition.</div>
</div>
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 4: PLATFORM DIAGRAM (CLEAN -- NO STATUS) -->
<!-- ============================================================ -->
<div class="slide" id="s4" style="padding: 16px 32px; align-items: center; overflow-y: auto;">
<span class="badge badge-amber" style="margin-bottom: 8px; flex-shrink: 0;">ARCHITECTURE OVERVIEW</span>
<h2 style="font-size: 1.4rem; margin-bottom: 12px; flex-shrink: 0;">Platform Blueprint</h2>
<div style="width:100%;display:flex;justify-content:center;margin:24px 0;">
<svg viewBox="0 0 900 520" fill="none" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:900px;height:auto;">
<defs>
<linearGradient id="s4-g1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#6366F1"/><stop offset="100%" stop-color="#8B5CF6"/></linearGradient>
<linearGradient id="s4-g2" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#06B6D4"/><stop offset="100%" stop-color="#10B981"/></linearGradient>
<linearGradient id="s4-g3" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#d97706"/><stop offset="100%" stop-color="#f59e0b"/></linearGradient>
</defs>
<!-- Layer 1: User Layer -->
<rect x="50" y="10" width="800" height="56" rx="12" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<rect x="58" y="18" width="8" height="40" rx="4" fill="url(#s4-g3)"/>
<text x="80" y="35" fill="#E2E8F0" font-size="13" font-weight="700">User Layer</text>
<text x="80" y="52" fill="#94A3B8" font-size="10">Chat UI | Agent Selector | Dashboard | Explorer | Settings</text>
<text x="780" y="44" fill="#94A3B8" font-size="9" text-anchor="end">Layer 1</text>
<!-- Arrow 1→2 -->
<line x1="450" y1="66" x2="450" y2="80" stroke="#6366F1" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="1s" repeatCount="indefinite"/></line>
<polygon points="444,78 450,86 456,78" fill="#6366F1"/>
<!-- Layer 2: Communication Layer -->
<rect x="50" y="86" width="800" height="56" rx="12" fill="#1A1A2E" stroke="url(#s4-g1)" stroke-width="1.5"/>
<rect x="58" y="94" width="8" height="40" rx="4" fill="url(#s4-g1)"/>
<text x="80" y="111" fill="#818CF8" font-size="13" font-weight="700">Communication Layer</text>
<text x="80" y="128" fill="#94A3B8" font-size="10">Director Pipeline | Gateway Executor | Skill Dispatcher | Routing</text>
<text x="780" y="120" fill="#818CF8" font-size="9" text-anchor="end">Layer 2 (Hub)</text>
<!-- Arrow 2→3 -->
<line x1="450" y1="142" x2="450" y2="156" stroke="#6366F1" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="1s" repeatCount="indefinite"/></line>
<polygon points="444,154 450,162 456,154" fill="#6366F1"/>
<!-- Layer 3: Agent Layer -->
<rect x="50" y="162" width="800" height="56" rx="12" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<rect x="58" y="170" width="8" height="40" rx="4" fill="url(#s4-g2)"/>
<text x="80" y="187" fill="#E2E8F0" font-size="13" font-weight="700">Agent Layer</text>
<text x="80" y="204" fill="#94A3B8" font-size="10">82 Agents | 11 Teams | compiled-personas.json | L0+L1+L2+L3 Prompt Assembly</text>
<text x="780" y="196" fill="#94A3B8" font-size="9" text-anchor="end">Layer 3</text>
<!-- Arrow 3→4 -->
<line x1="450" y1="218" x2="450" y2="232" stroke="#06B6D4" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="1s" repeatCount="indefinite"/></line>
<polygon points="444,230 450,238 456,230" fill="#06B6D4"/>
<!-- Layer 4: Context Layer -->
<rect x="50" y="238" width="800" height="56" rx="12" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<rect x="58" y="246" width="8" height="40" rx="4" fill="url(#s4-g2)"/>
<text x="80" y="263" fill="#E2E8F0" font-size="13" font-weight="700">Context Layer</text>
<text x="80" y="280" fill="#94A3B8" font-size="10">Auto-Context | Cross-Reference Graph | Profile Learning | Doc Registry</text>
<text x="780" y="272" fill="#94A3B8" font-size="9" text-anchor="end">Layer 4</text>
<!-- Arrow 4→5 -->
<line x1="450" y1="294" x2="450" y2="308" stroke="#06B6D4" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="1s" repeatCount="indefinite"/></line>
<polygon points="444,306 450,314 456,306" fill="#06B6D4"/>
<!-- Layer 5: Compute Layer -->
<rect x="50" y="314" width="800" height="56" rx="12" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<rect x="58" y="322" width="8" height="40" rx="4" fill="url(#s4-g3)"/>
<text x="80" y="339" fill="#E2E8F0" font-size="13" font-weight="700">Compute Layer</text>
<text x="80" y="356" fill="#94A3B8" font-size="10">Multi-Provider Factory | BYOT + Platform | Token Budgets | Usage Metering</text>
<text x="780" y="348" fill="#94A3B8" font-size="9" text-anchor="end">Layer 5</text>
<!-- Arrow 5→6 -->
<line x1="450" y1="370" x2="450" y2="384" stroke="#d97706" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="1s" repeatCount="indefinite"/></line>
<polygon points="444,382 450,390 456,382" fill="#d97706"/>
<!-- Layer 6: Storage Layer -->
<rect x="50" y="390" width="800" height="56" rx="12" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<rect x="58" y="398" width="8" height="40" rx="4" fill="url(#s4-g3)"/>
<text x="80" y="415" fill="#E2E8F0" font-size="13" font-weight="700">Storage Layer</text>
<text x="80" y="432" fill="#94A3B8" font-size="10">Google Drive | OneDrive | MemoryFS (demo) | StorageClient Abstraction</text>
<text x="780" y="424" fill="#94A3B8" font-size="9" text-anchor="end">Layer 6</text>
<!-- Arrow 6→7 -->
<line x1="450" y1="446" x2="450" y2="460" stroke="#d97706" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="1s" repeatCount="indefinite"/></line>
<polygon points="444,458 450,466 456,458" fill="#d97706"/>
<!-- Layer 7: Infrastructure -->
<rect x="50" y="466" width="800" height="48" rx="12" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<rect x="58" y="474" width="8" height="32" rx="4" fill="#334155"/>
<text x="80" y="489" fill="#94A3B8" font-size="13" font-weight="700">Infrastructure</text>
<text x="80" y="503" fill="#94A3B8" font-size="10">Neon Postgres | Clerk | Stripe | PostHog | Sentry | Vercel</text>
<text x="780" y="496" fill="#94A3B8" font-size="9" text-anchor="end">Foundation</text>
</svg>
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 5: USER LAYER -->
<!-- ============================================================ -->
<div class="slide" id="s5">
<div class="layer-header">
<span class="badge badge-amber">LAYER 1</span>
<h2>User Layer</h2>
<span class="text-stone text-sm">— The human is always in command</span>
</div>
<p class="text-stone text-sm mb-6">People and teams. Authentication, settings, file browsing, chat interface, and PA-led onboarding.</p>
<div class="grid-3 gap-4">
<div class="card">
<h3 class="text-cyan mb-4">Authentication</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
Clerk-powered auth<br>
Google + Microsoft + LinkedIn + Email<br>
Webhook sync to <code>users</code> table<br>
Protected routes via middleware<br>
Beta: invite-code gating
</div>
</div>
<div class="card">
<h3 class="text-cyan mb-4">Chat Interface</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
Streaming responses via Vercel AI SDK <code>useChat</code><br>
<code>/</code> triggers Skill Palette (80+ skills, fuzzy search)<br>
<code>@</code> triggers Agent Selector (82 agents + gateways + custom)<br>
Markdown rendering (tables, code, headers)<br>
Tool call indicators + inline <strong style="color: var(--warm-white);">Document Cards</strong><br>
<strong style="color: var(--warm-white);">StreamingMessage</strong> with typing rhythm (O3)<br>
<strong style="color: var(--warm-white);">WorkingIndicator</strong> contextual status (O3)<br>
Full-text search via <strong style="color: var(--warm-white);">Cmd+K</strong> command palette
</div>
</div>
<div class="card">
<h3 class="text-cyan mb-4">PA-Led Onboarding (O1-O3)</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
9-step conversational onboarding:<br>
PA Greeting <span class="arrow">→</span> Profile Confirm<br>
<span class="arrow">→</span> Drive Connection (mandatory)<br>
<span class="arrow">→</span> Team Auto-Selection<br>
<span class="arrow">→</span> First Micro-Task <span class="arrow">→</span> PA Rename<br>
<span class="arrow">→</span> Guided Tour <span class="arrow">→</span> Integrations<br>
<span class="arrow">→</span> Team Exploration<br>
Target: first output in <5 minutes
</div>
</div>
</div>
<div class="grid-2 gap-4 mt-6">
<div class="card">
<h3 class="text-cyan mb-4">File Explorer</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
Two-mode explorer: <strong style="color: var(--warm-white);">Workspace</strong> (Legionis context folders) + <strong style="color: var(--warm-white);">My Drive</strong> (full Drive tree)<br>
Markdown preview panel · File tree component<br>
Agent write boundary: agents read everywhere, write only to workspace
</div>
</div>
<div class="card">
<h3 class="text-cyan mb-4">Settings</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
7-tab IA: Profile | API Keys | AI Config | Connections | Storage | Billing | <strong style="color: var(--amber);">Agents</strong><br>
Storage multi-provider: Google Drive + OneDrive with unified interface<br>
Stripe billing with trial countdown · API key management with validation<br>
AI quality toggle (Fast / Balanced / Max) with provider-neutral labels<br>
<strong style="color: var(--amber);">Agents Panel:</strong> Custom agents, groups, gateways (CRUD)
</div>
</div>
</div>
<div class="grid-2 gap-4 mt-4">
<div class="card" style="border-left: 3px solid var(--green);">
<h3 class="text-green mb-4">Dynamic Waiting UX</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">Orbital animation component</strong> — cinematic waiting experience during agent processing<br>
Replaces generic spinners with dynamic, branded orbital motion<br>
Contextual status messages adapt to current pipeline stage
</div>
</div>
<div class="card" style="border-left: 3px solid var(--cyan);">
<h3 class="text-cyan mb-4">Token Usage Display</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
Real-time token consumption visibility per conversation<br>
Input/output token breakdown with cost estimation<br>
Provider-aware display (BYOT vs managed)
</div>
</div>
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 6: ONBOARDING SYSTEM (O1-O3) -- NEW -->
<!-- ============================================================ -->
<div class="slide" id="s6">
<div class="layer-header">
<span class="badge badge-purple">O1-O3</span>
<h2>Onboarding System</h2>
<span class="text-stone text-sm">— PA-led, enrichment-powered, action-driven</span>
</div>
<p class="text-stone text-sm mb-6">Three-week build transforming signup into a conversational experience. The PA demonstrates the product by being the product.</p>
<div class="grid-3 gap-4">
<div class="card" style="border-left: 3px solid var(--purple);">
<h3 class="text-purple mb-4">O1: Enrichment + Workspace</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">User Profiles</strong> table (table 19) with GDPR lifecycle<br>
<strong style="color: var(--warm-white);">Apollo.io enrichment</strong> — async from Clerk webhook<br>
Job title, seniority, department, company, industry<br>
<strong style="color: var(--warm-white);">L0 prompt layer</strong> — ~150 tokens of user context prepended before L1 (user profile → agent adaptation)<br>
Drive workspace auto-creation on OAuth connect<br>
Vercel cron for stuck-profile retry<br>
PA onboarding prompt (Steps 1-3)
</div>
</div>
<div class="card" style="border-left: 3px solid var(--purple);">
<h3 class="text-purple mb-4">O2: UI Actions + Teams</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">Agent UI Action system</strong> — 12 actions, 3 security tiers<br>
<strong style="color: var(--warm-white);">AgentUIActionProvider</strong> (React context + action queue)<br>
Highlight overlay + undo toast + confirmation banner<br>
"PA is guiding you" indicator<br>
<strong style="color: var(--warm-white);">Team auto-selection</strong> rules engine<br>
Enrichment data → deterministic team suggestions<br>
First micro-task saves to Drive
</div>
</div>
<div class="card" style="border-left: 3px solid var(--purple);">
<h3 class="text-purple mb-4">O3: Streaming UX + Analytics</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">StreamingMessage</strong> component:<br>
• Word-by-word fade-in (80-120ms)<br>
• Punctuation pauses (150-200ms)<br>
• Paragraph pauses (300-400ms)<br>
<strong style="color: var(--warm-white);">WorkingIndicator</strong> — contextual status<br>
PA rename + guided tour + integrations prompt<br>
<strong style="color: var(--warm-white);">12 new PostHog events</strong> for onboarding funnel<br>
Time-to-first-output + drop-off tracking
</div>
</div>
</div>
<div class="grid-2 gap-4 mt-4">
<div class="card">
<h3 class="text-amber mb-4">L0 Prompt Layer (O1)</h3>
<div class="code-block">
<span class="cmt">// prompt-assembler.ts — new L0 layer</span>
<span class="kw">L0: User Context</span> <span class="cmt">~150 tokens</span>
Job title, seniority, company, industry
<span class="str">Injected before L1 for every agent</span>
User profile → agent tone adaptation
<span class="kw">L1: Core Protocol</span> <span class="cmt">~1,500 tokens</span>
Response rules, V2V framework, routing
<span class="kw">L2: Agent Persona</span> <span class="cmt">~500 tokens</span>
Identity, how-I-think, RACI, skills
<span class="kw">L3: Domain Context</span> <span class="cmt">~300-500 tokens</span>
Conditional rules + knowledge packs
</div>
</div>
<div class="card">
<h3 class="text-amber mb-4">Enrichment Pipeline</h3>
<div class="code-block">
<span class="cmt">// Clerk webhook → enrichment flow</span>
<span class="kw">1.</span> user.created webhook fires
<span class="kw">2.</span> Create <span class="fn">users</span> row + pending <span class="fn">user_profiles</span> row
<span class="kw">3.</span> Return 200 immediately
<span class="kw">4.</span> <span class="str">after()</span> fires Apollo.io enrichment async
<span class="kw">5.</span> Parse: job_title, seniority, department,
company_name, industry, company_size
<span class="kw">6.</span> Update <span class="fn">user_profiles</span> with enrichment data
<span class="kw">7.</span> Team auto-selection runs on enriched data
<span class="cmt">// Fallback: PA asks basic questions if enrichment fails</span>
<span class="cmt">// Cron: retry profiles stuck >5 min</span>
</div>
</div>
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 7: AGENT UI ACTIONS SYSTEM (O2) -- NEW -->
<!-- ============================================================ -->
<div class="slide" id="s7">
<div class="layer-header">
<span class="badge badge-purple">O2</span>
<h2>Agent UI Actions System</h2>
<span class="text-stone text-sm">— Agents can act in the product UI</span>
</div>
<p class="text-stone text-sm mb-6">12 actions across 3 security tiers. Agents don't just talk; they navigate, highlight, toggle, and configure. PA uses this during onboarding to demonstrate the product by being the product.</p>
<div class="grid-3 gap-4">
<div class="card" style="border-left: 3px solid var(--green);">
<h3 style="margin-bottom: 12px;"><span class="tier-passive">Passive Tier</span> <span class="text-xs text-stone">— Execute freely</span></h3>
<div class="text-sm text-stone" style="line-height: 2;">
<code>navigate_to</code> — Go to a page<br>
<code>highlight_element</code> — Soft glow + tooltip<br>
<code>show_inline_card</code> — Rich inline content<br>
<code>open_panel</code> — Open a UI panel
</div>
</div>
<div class="card" style="border-left: 3px solid var(--yellow);">
<h3 style="margin-bottom: 12px;"><span class="tier-active">Active Tier</span> <span class="text-xs text-stone">— User confirms inline</span></h3>
<div class="text-sm text-stone" style="line-height: 2;">
<code>toggle_setting</code> — Change a setting<br>
<code>connect_integration</code> — OAuth flow<br>
<code>add_team</code> — Add agent team<br>
<code>remove_team</code> — Remove agent team<br>
<code>update_profile</code> — Edit profile fields
</div>
</div>
<div class="card" style="border-left: 3px solid var(--red);">
<h3 style="margin-bottom: 12px;"><span class="tier-sensitive">Sensitive Tier</span> <span class="text-xs text-stone">— Full confirmation dialog</span></h3>
<div class="text-sm text-stone" style="line-height: 2;">
<code>change_billing</code> — Billing changes<br>
<code>delete_data</code> — Data deletion<br>
<code>modify_security</code> — Security settings
</div>
</div>
</div>
<div class="grid-2 gap-4 mt-4">
<div class="card">
<h3 class="text-amber mb-4">UX Components</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">AgentUIActionProvider</strong> — React context wrapping the app. Manages action queue, processes actions from chat stream, coordinates rendering.<br><br>
<strong style="color: var(--warm-white);">Highlight Overlay</strong> — Soft glow effect on target element + tooltip message. Used for guided tours and feature discovery.<br><br>
<strong style="color: var(--warm-white);">Undo Toast</strong> — 5-second undo window for Active actions (like Gmail). Builds trust through reversibility.<br><br>
<strong style="color: var(--warm-white);">Confirmation Banner</strong> — Full dialog for Sensitive tier. Explicit approval required before execution.<br><br>
<strong style="color: var(--warm-white);">"PA is guiding you"</strong> — Subtle indicator showing when the agent is driving the UI vs. free navigation.
</div>
</div>
<div class="card">
<h3 class="text-amber mb-4">Action Flow Architecture</h3>
<div class="code-block">
<span class="cmt">// Chat stream → UI Action pipeline</span>
<span class="kw">1.</span> Agent calls <span class="fn">ui_navigate</span> / <span class="fn">ui_highlight</span> / etc.
<span class="kw">2.</span> Tool call detected in stream
<span class="kw">3.</span> <span class="fn">AgentUIActionProvider</span> receives action
<span class="kw">4.</span> Check security tier:
<span class="str">Passive</span> → Execute immediately
<span class="str">Active</span> → Show undo toast, execute
<span class="str">Sensitive</span> → Show confirmation dialog
<span class="kw">5.</span> Action rendered in UI
<span class="kw">6.</span> Result returned to agent
<span class="cmt">// MVP scope: PA uses all tiers during onboarding</span>
<span class="cmt">// Other agents: Passive only at launch</span>
</div>
<div class="divider"></div>
<div class="text-xs text-stone">
<strong style="color: var(--warm-white);">6 new AI SDK tools</strong> for UI actions: <code>ui_navigate</code>, <code>ui_highlight</code>, <code>ui_show_card</code>, <code>ui_open_panel</code>, <code>ui_toggle_setting</code>, <code>ui_connect_integration</code>
</div>
</div>
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 8: COMMUNICATION LAYER -->
<!-- ============================================================ -->
<div class="slide" id="s8">
<div class="layer-header">
<span class="badge badge-amber">LAYER 2</span>
<h2>Communication Layer</h2>
<span class="usp-num">USP #4</span>
</div>
<p class="text-stone text-sm mb-6">The central hub. Routes user requests, queries organizational context, dispatches the right agents, and assembles responses back to the user.</p>
<div class="grid-4 gap-4">
<div class="card">
<h3 class="text-cyan" style="font-size: 0.9rem; margin-bottom: 8px;">Routing & Dispatch</h3>
<div class="text-xs text-stone" style="line-height: 1.8;">
<code>auto-router.ts</code> — domain detection<br>
<code>skill-dispatcher.ts</code> — /skill parsing<br>
<code>document-intelligence.ts</code><br>
Create / Update / Find modes
</div>
</div>
<div class="card">
<h3 class="text-cyan" style="font-size: 0.9rem; margin-bottom: 8px;">Cooperation Protocols</h3>
<div class="text-xs text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">Consultation</strong> — Ask for a perspective<br>
<strong style="color: var(--warm-white);">Delegation</strong> — Assign a sub-deliverable<br>
<strong style="color: var(--warm-white);">Review</strong> — Quality validation<br>
<strong style="color: var(--warm-white);">Debate</strong> — Structured advocacy
</div>
</div>
<div class="card">
<h3 class="text-cyan" style="font-size: 0.9rem; margin-bottom: 8px;">Gateway Engine</h3>
<div class="text-xs text-stone" style="line-height: 1.8;">
<code>@product</code> <code>@plt</code> <code>@design</code><br>
<code>@architecture</code> <code>@marketing</code><br>
<code>@finance</code> <code>@legal</code> <code>@ops</code><br>
<code>@executive</code> <code>@corpdev</code> <code>@it</code><br>
Auto-selects agents by RACI
</div>
</div>
<div class="card">
<h3 class="text-cyan" style="font-size: 0.9rem; margin-bottom: 8px;">Meeting Mode</h3>
<div class="text-xs text-stone" style="line-height: 1.8;">
3-4 agents in parallel<br>
Individual perspectives first<br>
Alignment & tension analysis<br>
Senior agent synthesis last
</div>
</div>
</div>
<div class="grid-2 gap-4 mt-6">
<div class="card">
<h3 class="text-amber mb-4">Gateway Execution Flow</h3>
<div class="code-block">
<span class="cmt">// gateway-executor.ts</span>
User: <span class="str">"@plt should we prioritize webhooks or SDK?"</span>
<span class="kw">1.</span> Parse gateway invocation
<span class="kw">2.</span> Analyze complexity (SINGLE / PRIMARY+ / MULTI)
<span class="kw">3.</span> Select agents via RACI mapping
<span class="cmt">// This topic: VP Product + PM + Dir PMM</span>
<span class="kw">4.</span> Execute all agents in parallel
<span class="cmt">// Promise.allSettled, max 4 concurrent</span>
<span class="kw">5.</span> Collect responses with timing data
<span class="kw">6.</span> Assemble Meeting Mode output:
Individual voices <span class="arrow">→</span> Alignment <span class="arrow">→</span> Tension <span class="arrow">→</span> Synthesis
</div>
</div>
<div class="card">
<h3 class="text-amber mb-4">Sub-Agent Spawning</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
<code>spawn-agent.ts</code> tool allows agents to create child agents<br><br>
<strong style="color: var(--warm-white);">How it works:</strong><br>
Parent calls <code>spawnAgent({ agentKey, task, context })</code><br>
<span class="arrow">→</span> Child gets its own L0+L1+L2 system prompt<br>
<span class="arrow">→</span> Executes <code>generateText()</code> (not streaming)<br>
<span class="arrow">→</span> Result returned to parent for integration<br><br>
<strong style="color: var(--warm-white);">Guardrails:</strong> Max depth 3 levels. Max 4 parallel. Delegation pattern detection (<code>[CONSULTATION]</code>, <code>[DELEGATION]</code>, etc.)
</div>
</div>
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 9: ROUTING DECISION ENGINE -->
<!-- ============================================================ -->
<div class="slide" id="s9">
<div class="layer-header">
<span class="badge badge-amber">LAYER 2</span>
<h2>Communication Layer — Unified Director Pipeline</h2>
</div>
<p class="text-stone text-sm mb-6">The Director is the sole router. All legacy/fallback routing has been removed. Two-stage pipeline: fast-path for explicit @mentions, Opus LLM call for everything else.</p>
<div style="width:100%;display:flex;justify-content:center;margin:0 0 20px 0;">
<svg viewBox="0 0 940 160" fill="none" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:940px;height:auto;">
<defs>
<linearGradient id="s9-g1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#6366F1"/><stop offset="100%" stop-color="#8B5CF6"/></linearGradient>
<linearGradient id="s9-g2" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#06B6D4"/><stop offset="100%" stop-color="#10B981"/></linearGradient>
<linearGradient id="s9-g3" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#d97706"/><stop offset="100%" stop-color="#f59e0b"/></linearGradient>
</defs>
<!-- Message input -->
<rect x="5" y="50" width="80" height="40" rx="20" fill="url(#s9-g1)"/><text x="45" y="75" text-anchor="middle" fill="white" font-size="10" font-weight="600">Message</text>
<!-- Arrow to Routing -->
<line x1="85" y1="70" x2="110" y2="70" stroke="#6366F1" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="0.8s" repeatCount="indefinite"/></line>
<polygon points="108,65 116,70 108,75" fill="#6366F1"/>
<!-- Stage 1: Routing -->
<rect x="116" y="40" width="100" height="60" rx="10" fill="#1A1A2E" stroke="#10B981" stroke-width="1.5"/>
<text x="166" y="62" text-anchor="middle" fill="#10B981" font-size="10" font-weight="700">ROUTING</text>
<text x="166" y="78" text-anchor="middle" fill="#94A3B8" font-size="8">fast-path / LLM</text>
<text x="166" y="90" text-anchor="middle" fill="#10B981" font-size="7">~90% cache</text>
<!-- Arrow -->
<line x1="216" y1="70" x2="236" y2="70" stroke="#06B6D4" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="0.8s" repeatCount="indefinite"/></line>
<polygon points="234,65 242,70 234,75" fill="#06B6D4"/>
<!-- Stage 2: Guidelines -->
<rect x="242" y="40" width="100" height="60" rx="10" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<text x="292" y="62" text-anchor="middle" fill="#E2E8F0" font-size="10" font-weight="700">GUIDELINES</text>
<text x="292" y="78" text-anchor="middle" fill="#94A3B8" font-size="8">per-agent rules</text>
<text x="292" y="90" text-anchor="middle" fill="#94A3B8" font-size="7">knowledge packs</text>
<!-- Arrow -->
<line x1="342" y1="70" x2="362" y2="70" stroke="#06B6D4" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="0.8s" repeatCount="indefinite"/></line>
<polygon points="360,65 368,70 360,75" fill="#06B6D4"/>
<!-- Stage 3: Pre-Agent -->
<rect x="368" y="40" width="100" height="60" rx="10" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<text x="418" y="62" text-anchor="middle" fill="#E2E8F0" font-size="10" font-weight="700">PRE-AGENT</text>
<text x="418" y="78" text-anchor="middle" fill="#94A3B8" font-size="8">URL pre-fetch</text>
<text x="418" y="90" text-anchor="middle" fill="#94A3B8" font-size="7">auto-context</text>
<!-- Arrow -->
<line x1="468" y1="70" x2="488" y2="70" stroke="#6366F1" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="0.8s" repeatCount="indefinite"/></line>
<polygon points="486,65 494,70 486,75" fill="#6366F1"/>
<!-- Stage 4: Agent Execution (highlighted) -->
<rect x="494" y="35" width="110" height="70" rx="12" fill="#1A1A2E" stroke="url(#s9-g1)" stroke-width="2"/>
<rect x="494" y="35" width="110" height="70" rx="12" fill="url(#s9-g1)" opacity="0.06"/>
<text x="549" y="62" text-anchor="middle" fill="#818CF8" font-size="10" font-weight="700">EXECUTION</text>
<text x="549" y="78" text-anchor="middle" fill="#94A3B8" font-size="8">streamAgent()</text>
<text x="549" y="90" text-anchor="middle" fill="#94A3B8" font-size="7">L0+L1+L2+L3</text>
<!-- Fork indicator -->
<line x1="549" y1="105" x2="549" y2="130" stroke="#334155" stroke-width="1" stroke-dasharray="3 2"/>
<text x="549" y="148" text-anchor="middle" fill="#94A3B8" font-size="8" font-style="italic">single vs multi-agent fork</text>
<!-- Arrow -->
<line x1="604" y1="70" x2="624" y2="70" stroke="#6366F1" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="0.8s" repeatCount="indefinite"/></line>
<polygon points="622,65 630,70 622,75" fill="#6366F1"/>
<!-- Stage 5: Post-Agent -->
<rect x="630" y="40" width="100" height="60" rx="10" fill="#1A1A2E" stroke="#334155" stroke-width="1"/>
<text x="680" y="62" text-anchor="middle" fill="#E2E8F0" font-size="10" font-weight="700">POST-AGENT</text>
<text x="680" y="78" text-anchor="middle" fill="#94A3B8" font-size="8">quality review</text>
<text x="680" y="90" text-anchor="middle" fill="#94A3B8" font-size="7">synthesis (multi)</text>
<!-- Arrow -->
<line x1="730" y1="70" x2="750" y2="70" stroke="#d97706" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="0.8s" repeatCount="indefinite"/></line>
<polygon points="748,65 756,70 748,75" fill="#d97706"/>
<!-- Stage 6: Response -->
<rect x="756" y="40" width="100" height="60" rx="10" fill="#1A1A2E" stroke="url(#s9-g3)" stroke-width="1.5"/>
<text x="806" y="62" text-anchor="middle" fill="#d97706" font-size="10" font-weight="700">RESPONSE</text>
<text x="806" y="78" text-anchor="middle" fill="#94A3B8" font-size="8">engagement</text>
<text x="806" y="90" text-anchor="middle" fill="#94A3B8" font-size="7">suggestions</text>
<!-- Arrow to output -->
<line x1="856" y1="70" x2="876" y2="70" stroke="#d97706" stroke-width="1.5" stroke-dasharray="4 3"><animate attributeName="stroke-dashoffset" values="7;0" dur="0.8s" repeatCount="indefinite"/></line>
<polygon points="874,65 882,70 874,75" fill="#d97706"/>
<circle cx="900" cy="70" r="14" fill="url(#s9-g3)"/><text x="900" y="74" text-anchor="middle" fill="white" font-size="9" font-weight="700">UI</text>
<!-- Top label -->
<text x="470" y="22" text-anchor="middle" fill="#818CF8" font-size="10" font-weight="600">Director Pipeline — Unified Request Flow</text>
</svg>
</div>
<div class="grid-2 gap-4">
<div class="card">
<h3 class="text-amber mb-4">Unified Director Pipeline</h3>
<div class="code-block">
<span class="cmt">// director/pipeline.ts — sole routing authority</span>
User: <span class="str">"How should we price the enterprise tier?"</span>
<span class="kw">1. ROUTING</span> <span class="cmt">// Two-stage decision</span>
Fast-path: explicit <span class="str">@agent</span> or <span class="str">/skill</span> → direct dispatch
Otherwise: <span class="str">Opus LLM call</span> with cached routing prompt
Prompt split: <span class="str">~90% cached</span> (stable) + <span class="str">~10% dynamic</span> (per-request)
<span class="kw">2. GUIDELINES</span> <span class="cmt">// Per-agent instructions</span>
Single atomic structured output:
strategy, agents[], per-agent guidelines,
knowledge packs, tool profiles, integration scopes,
pre-spawn message, model selection
<span class="kw">3. PRE-AGENT</span> <span class="cmt">// Context assembly</span>
URL pre-analysis + auto-context injection
<span class="kw">4. AGENT EXECUTION</span> <span class="cmt">// streamAgent()</span>
L0+L1+L2+L3 prompt + Director guidelines
<span class="kw">5. POST-AGENT REVIEW</span> <span class="cmt">// Quality gate</span>
Director reviews output for quality
<span class="kw">6. SYNTHESIS</span> <span class="cmt">// Multi-agent only</span>
Alignment → Tension → Recommendations
</div>
</div>
<div>
<div class="card" style="margin-bottom: 16px;">
<h3 class="text-amber mb-4">Key Design Principle</h3>
<div class="text-sm text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">Director is the SOLE router.</strong><br>
All legacy deterministic routing, keyword scoring, and fallback paths have been <strong style="color: var(--cyan);">removed</strong>.<br><br>
The routing prompt is split into <strong style="color: var(--cyan);">cached (~90% stable)</strong> and <strong style="color: var(--cyan);">dynamic (per-request)</strong> parts for efficiency.<br><br>
<strong style="color: var(--warm-white);">Result:</strong> ~90% prompt cache hit rate. Consistent, intelligent routing that understands nuance, not just keywords.
</div>
</div>
<div class="card" style="margin-bottom: 16px;">
<h3 class="text-amber mb-4">Atomic Structured Output</h3>
<div class="text-xs text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">Single LLM call</strong> produces all routing decisions at once:<br>
<strong style="color: var(--warm-white);">Strategy</strong> — routing rationale + engagement suggestions<br>
<strong style="color: var(--warm-white);">Agents[]</strong> — selected agents with per-agent guidelines<br>
<strong style="color: var(--warm-white);">Knowledge packs</strong> — domain context to inject<br>
<strong style="color: var(--warm-white);">Tool profiles</strong> — which tools to enable<br>
<strong style="color: var(--warm-white);">Model selection</strong> — per-agent model override
</div>
</div>
<div class="card">
<h3 class="text-amber mb-4">Pipeline Stages</h3>
<div class="text-xs text-stone" style="line-height: 1.8;">
<strong style="color: var(--warm-white);">Routing</strong> <span class="arrow">→</span> <strong style="color: var(--warm-white);">Guidelines</strong> <span class="arrow">→</span> <strong style="color: var(--warm-white);">Pre-agent</strong> <span class="arrow">→</span> <strong style="color: var(--warm-white);">Agent execution</strong> <span class="arrow">→</span> <strong style="color: var(--warm-white);">Post-agent review</strong> <span class="arrow">→</span> <strong style="color: var(--warm-white);">Synthesis</strong> (if multi-agent) <span class="arrow">→</span> <strong style="color: var(--warm-white);">Engagement suggestions</strong><br><br>
Director decision audit trail stored in <code>directorDecisions</code> table.<br>
Conversation analytics tracked in <code>conversationAnalytics</code> table.
</div>
</div>
</div>
</div>
</div>
<!-- ============================================================ -->
<!-- SLIDE 10: AGENT LAYER -->
<!-- ============================================================ -->
<div class="slide" id="s10">
<div class="layer-header">
<span class="badge badge-amber">LAYER 3</span>
<h2>Agent Layer</h2>
<span class="usp-num">USP #3</span>
</div>
<p class="text-stone text-sm mb-6">82 specialist agents across 11 domain teams. Each with personality, skills, knowledge packs, and a V2V operating phase.</p>
<div style="width:100%;display:flex;justify-content:center;margin:0 0 16px 0;">
<svg viewBox="0 0 900 200" fill="none" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:900px;height:auto;">
<defs>
<linearGradient id="s10-g1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#6366F1"/><stop offset="100%" stop-color="#8B5CF6"/></linearGradient>
<linearGradient id="s10-g2" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#06B6D4"/><stop offset="100%" stop-color="#10B981"/></linearGradient>
<linearGradient id="s10-g3" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#d97706"/><stop offset="100%" stop-color="#f59e0b"/></linearGradient>
</defs>
<!-- L3: User Context (topmost, widest) -->
<rect x="40" y="10" width="500" height="38" rx="8" fill="#1A1A2E" stroke="#d97706" stroke-width="1" opacity="0.9"/>
<text x="56" y="28" fill="#d97706" font-size="10" font-weight="700">L3</text>
<text x="80" y="28" fill="#E2E8F0" font-size="10" font-weight="600">User Context</text>