Repository navigation
Expand file tree
/
Copy pathvariant-c.html
More file actions
743 lines (706 loc) · 36.8 KB
/
Copy pathvariant-c.html
File metadata and controls
743 lines (706 loc) · 36.8 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
<!DOCTYPE html>
<!-- PROTOTYPE — throwaway aesthetic comparison, delete after decision. -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Git Worktrees — TMUX COMMAND CENTER</title>
<style>
:root{
--bg:#04070a;
--bg2:#060b0d;
--green:#00ff9c;
--green-dim:#0aa06a;
--green-deep:#063a28;
--amber:#ffcf5c;
--red:#ff3b47;
--claude:#D97757;
--codex:#2DB88E;
--gemini:#8E7CF0;
--status:#0b8f5a;
--mono: "SFMono-Regular", "DejaVu Sans Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;width:100%;overflow:hidden;background:#000}
body{
font-family:var(--mono);
color:var(--green);
-webkit-font-smoothing:none;
text-rendering:geometricPrecision;
}
/* ---------- STAGE ---------- */
#stage{
position:fixed; inset:0;
background:
radial-gradient(120% 90% at 50% 42%, rgba(6,32,22,.55), rgba(2,4,6,.98) 78%),
var(--bg);
overflow:hidden;
cursor:default;
perspective:1400px;
}
/* faint screen curvature/vignette */
#stage::after{
content:""; position:absolute; inset:0; pointer-events:none; z-index:60;
background:
radial-gradient(130% 120% at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%);
mix-blend-mode:multiply;
}
/* scanlines */
.scanlines{
position:absolute; inset:0; pointer-events:none; z-index:55;
background:repeating-linear-gradient(
to bottom,
rgba(0,0,0,0) 0px,
rgba(0,0,0,0) 2px,
rgba(0,0,0,.28) 3px,
rgba(0,0,0,0) 4px);
opacity:.5;
animation:scanroll 8s linear infinite;
}
@keyframes scanroll{from{background-position:0 0}to{background-position:0 100px}}
/* flicker */
.flicker{
position:absolute; inset:0; pointer-events:none; z-index:56;
background:rgba(0,255,156,.015);
animation:flick 5s steps(20) infinite;
}
@keyframes flick{
0%,100%{opacity:.10} 8%{opacity:.03} 12%{opacity:.14}
20%{opacity:.05} 42%{opacity:.12} 58%{opacity:.02} 70%{opacity:.13} 84%{opacity:.05}
}
/* ---------- SLIDES ---------- */
.slide{
position:absolute; inset:0;
display:flex; flex-direction:column;
padding:2.4vh 2.6vw 5.4vh;
opacity:0; visibility:hidden;
transition:opacity .28s ease;
z-index:5;
}
.slide.active{opacity:1; visibility:visible; z-index:10}
/* phosphor glow util */
.glow{ text-shadow:0 0 4px rgba(0,255,156,.55), 0 0 12px rgba(0,255,156,.28); }
/* ---------- STATUS BAR (global tmux bar) ---------- */
#statusbar{
position:absolute; left:0; right:0; bottom:0; height:3.4vh; min-height:24px;
display:flex; align-items:center; z-index:40;
background:linear-gradient(var(--status),#097a4d);
color:#02150d; font-weight:700; font-size:clamp(10px,1.35vh,15px);
letter-spacing:.5px; box-shadow:0 -2px 14px rgba(0,255,156,.25);
white-space:nowrap; overflow:hidden;
}
#statusbar .seg{padding:0 12px; height:100%; display:flex; align-items:center}
#statusbar .session{background:#02150d; color:var(--green); font-weight:800}
#statusbar .winlist{display:flex; gap:0}
#statusbar .win{padding:0 10px; height:100%; display:flex; align-items:center; opacity:.72}
#statusbar .win.cur{background:#02150d; color:var(--green); opacity:1; text-shadow:0 0 6px rgba(0,255,156,.6)}
#statusbar .spacer{flex:1}
#statusbar .clock{font-variant-numeric:tabular-nums}
#statusbar .wcount{background:#02150d; color:var(--amber)}
/* ---------- PROGRESS DOTS ---------- */
#progress{
position:absolute; top:1.6vh; right:1.4vw; z-index:45;
display:flex; gap:8px; align-items:center;
font-size:clamp(10px,1.4vh,13px); color:var(--green-dim);
}
#progress .dot{
width:9px; height:9px; border:1px solid var(--green-dim);
transform:rotate(45deg); transition:all .25s ease;
}
#progress .dot.on{background:var(--green); box-shadow:0 0 8px var(--green); border-color:var(--green)}
#progress .lbl{margin-left:6px; letter-spacing:1px}
/* ---------- generic PANE ---------- */
.pane{
position:relative; border:1px solid var(--green-deep);
background:linear-gradient(180deg, rgba(3,20,14,.75), rgba(2,8,6,.85));
display:flex; flex-direction:column; overflow:hidden;
box-shadow:inset 0 0 40px rgba(0,60,40,.25);
}
.pane > .ptitle{
flex:0 0 auto; font-size:clamp(10px,1.5vh,14px);
padding:3px 10px; background:rgba(0,40,26,.6);
border-bottom:1px solid var(--green-deep);
display:flex; align-items:center; gap:8px; letter-spacing:.5px;
color:var(--green);
}
.pane .pbody{flex:1 1 auto; padding:8px 12px; overflow:hidden; font-size:clamp(11px,1.7vh,15px); line-height:1.45}
.pane .tag{font-weight:700}
/* block cursor */
.cur{
display:inline-block; width:.62em; height:1.05em; vertical-align:-.18em;
background:var(--green); box-shadow:0 0 8px var(--green);
animation:blink 1.05s steps(1) infinite;
}
.cur.c{background:var(--claude);box-shadow:0 0 8px var(--claude)}
.cur.x{background:var(--codex);box-shadow:0 0 8px var(--codex)}
.cur.g{background:var(--gemini);box-shadow:0 0 8px var(--gemini)}
@keyframes blink{0%,50%{opacity:1}50.01%,100%{opacity:0}}
.claudeC{color:var(--claude)} .codexC{color:var(--codex)} .geminiC{color:var(--gemini)}
.dim{color:var(--green-dim)} .red{color:var(--red)} .amber{color:var(--amber)}
.hash{color:var(--green-dim); font-weight:700}
/* =========================================================
BEAT 1 — TITLE / BOOT
========================================================= */
#b1 .boot{font-size:clamp(11px,1.7vh,15px); line-height:1.5; color:var(--green-dim); min-height:11vh}
#b1 .boot .ok{color:var(--green)}
#b1 .banner{margin-top:auto; margin-bottom:auto}
#b1 pre.ascii{
font-size:clamp(6px,1.55vh,15px); line-height:1.02; letter-spacing:0;
color:var(--green); white-space:pre; display:inline-block;
text-shadow:0 0 6px rgba(0,255,156,.5), 0 0 18px rgba(0,255,156,.25);
}
#b1 .sub{
margin-top:2.2vh; font-size:clamp(13px,2.6vh,30px); letter-spacing:3px;
color:var(--amber); text-shadow:0 0 8px rgba(255,207,92,.4);
}
#b1 .agents3{margin-top:2.4vh; display:flex; gap:22px; font-size:clamp(11px,1.9vh,17px); flex-wrap:wrap}
#b1 .agents3 b{font-weight:700}
.reveal{opacity:0; transform:translateY(8px)}
.slide.active .reveal.show{opacity:1; transform:none; transition:opacity .5s ease, transform .5s ease}
/* =========================================================
BEAT 2 — COLLISION
========================================================= */
#b2 .head, .beathead{
font-size:clamp(16px,3.4vh,40px); letter-spacing:1px; margin-bottom:1.2vh;
color:var(--green);
}
.beathead .n{color:var(--red)}
#b2 .wrap{flex:1; display:flex; gap:2vw; min-height:0}
#b2 .collide{flex:1.6; min-height:0}
#b2 .file .pbody{position:relative; font-size:clamp(11px,1.85vh,16px)}
#b2 .side{flex:1; display:flex; flex-direction:column; gap:1.4vh; min-height:0}
#b2 .who{padding:6px 10px; border:1px solid var(--green-deep); background:rgba(3,20,14,.5); font-size:clamp(11px,1.7vh,15px)}
#b2 .who .bar{height:6px; margin-top:6px; background:var(--green-deep); position:relative; overflow:hidden}
#b2 .who .bar i{position:absolute; left:0; top:0; bottom:0; width:0}
.ln{display:block; white-space:pre; transition:opacity .35s, transform .35s, filter .35s}
.ln.vanish{opacity:0; transform:translateX(-14px); filter:blur(2px)}
.ln.survive{color:var(--green); text-shadow:0 0 8px rgba(0,255,156,.7)}
#b2 .overlay-flash{
position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
background:rgba(255,59,71,.14); color:var(--red); font-weight:800;
font-size:clamp(16px,3.6vh,42px); letter-spacing:3px; opacity:0; pointer-events:none;
text-shadow:0 0 14px rgba(255,59,71,.7);
}
#b2 .overlay-flash.fire{animation:owflash 1.1s ease}
@keyframes owflash{0%{opacity:0} 12%{opacity:1} 20%{opacity:.2} 30%{opacity:1} 44%{opacity:.3} 60%{opacity:.95} 100%{opacity:0}}
#b2 .glitch{animation:glitch .18s steps(2) 3}
@keyframes glitch{0%{transform:translate(0)}25%{transform:translate(-2px,1px)}50%{transform:translate(2px,-1px)}75%{transform:translate(-1px,-1px)}100%{transform:translate(0)}}
.caption{margin-top:1.2vh; font-size:clamp(12px,2vh,20px); color:var(--amber); letter-spacing:1px}
.caption .mut{color:var(--green-dim)}
/* =========================================================
BEAT 3 — SPLIT (hero)
========================================================= */
#b3 .grid{
position:relative; flex:1; min-height:0; margin-top:.6vh;
display:grid; gap:0;
grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr;
}
#b3 .gp{
position:relative; overflow:hidden;
border:1px solid var(--green-deep);
background:linear-gradient(180deg, rgba(3,20,14,.7), rgba(2,8,6,.9));
opacity:0; transform:scale(.94);
transition:opacity .5s ease, transform .55s cubic-bezier(.2,.9,.25,1);
}
#b3 .gp.in{opacity:1; transform:none}
#b3 .gp .ptitle{font-size:clamp(10px,1.55vh,14px); padding:4px 10px; border-bottom:1px solid; display:flex; gap:8px; align-items:center}
#b3 .gp .pbody{padding:9px 12px; font-size:clamp(11px,1.7vh,15px); line-height:1.5; color:var(--green-dim)}
#b3 .gp.single{grid-column:1 / span 2; grid-row:1 / span 2}
.gp.p1{border-color:var(--claude)} .gp.p1 .ptitle{border-color:var(--claude); color:var(--claude); background:rgba(217,119,87,.12)}
.gp.p2{border-color:var(--codex)} .gp.p2 .ptitle{border-color:var(--codex); color:var(--codex); background:rgba(45,184,142,.12)}
.gp.p3{border-color:var(--gemini)} .gp.p3 .ptitle{border-color:var(--gemini); color:var(--gemini); background:rgba(142,124,240,.12)}
/* animated split dividers */
#b3 .divV,#b3 .divH{position:absolute; background:var(--green); box-shadow:0 0 12px var(--green); z-index:6; opacity:.9}
#b3 .divV{top:0; left:50%; width:2px; height:0; transform:translateX(-1px)}
#b3 .divH{left:0; top:50%; height:2px; width:0; transform:translateY(-1px)}
/* shared .git node */
#b3 .gitnode{
position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) scale(.4);
z-index:8; width:clamp(74px,10vw,120px); height:clamp(74px,10vw,120px);
border-radius:50%; display:flex; align-items:center; justify-content:center;
flex-direction:column; text-align:center;
background:radial-gradient(circle, rgba(0,255,156,.35), rgba(0,60,40,.15) 60%, transparent 72%);
border:1px solid var(--green); color:var(--green); font-weight:800;
font-size:clamp(11px,1.7vh,16px); letter-spacing:1px;
opacity:0; text-shadow:0 0 10px var(--green);
}
#b3 .gitnode small{font-weight:400; font-size:.62em; color:var(--green-dim)}
#b3 .gitnode.on{opacity:1; transform:translate(-50%,-50%) scale(1); transition:opacity .5s, transform .6s cubic-bezier(.2,1.4,.3,1); animation:gitpulse 2.2s ease-in-out infinite 1s}
@keyframes gitpulse{0%,100%{box-shadow:0 0 18px rgba(0,255,156,.45)}50%{box-shadow:0 0 40px rgba(0,255,156,.85)}}
/* connector spokes */
#b3 svg.spokes{position:absolute; inset:0; z-index:7; pointer-events:none}
#b3 svg.spokes line{stroke:var(--green); stroke-width:1.4; stroke-dasharray:6 7; opacity:0; filter:drop-shadow(0 0 3px var(--green))}
#b3 svg.spokes line.on{opacity:.7; animation:dash 1s linear infinite}
@keyframes dash{to{stroke-dashoffset:-26}}
#b3 .caps{margin-top:1vh; display:flex; gap:26px; flex-wrap:wrap; font-size:clamp(12px,1.9vh,18px)}
#b3 .caps span{color:var(--amber)} #b3 .caps b{color:var(--green)}
/* =========================================================
BEAT 4 — WIRING
========================================================= */
#b4 .grid{flex:1; min-height:0; display:grid; gap:1.1vh 1vw; grid-template-columns:1fr 1fr 1fr; margin-top:.6vh}
#b4 .wp{position:relative; overflow:hidden}
#b4 .wp .pbody{font-size:clamp(10px,1.55vh,14px); line-height:1.5}
#b4 .prompt{color:var(--green-dim)}
#b4 .cmd{color:var(--green)}
#b4 .out{color:var(--green-dim)}
#b4 .hashline{opacity:0; transform:translateY(4px)}
#b4 .hashline.show{opacity:1; transform:none; transition:.28s}
.wp.p1{border-color:var(--claude)} .wp.p1 .ptitle{border-color:var(--claude);color:var(--claude);background:rgba(217,119,87,.12)}
.wp.p2{border-color:var(--codex)} .wp.p2 .ptitle{border-color:var(--codex); color:var(--codex); background:rgba(45,184,142,.12)}
.wp.p3{border-color:var(--gemini)} .wp.p3 .ptitle{border-color:var(--gemini);color:var(--gemini);background:rgba(142,124,240,.12)}
.wp .prm-c{color:var(--claude)} .wp .prm-x{color:var(--codex)} .wp .prm-g{color:var(--gemini)}
/* =========================================================
BEAT 5 — MERGE
========================================================= */
#b5 .stagewrap{flex:1; min-height:0; position:relative; display:flex; flex-direction:column; margin-top:.6vh}
#b5 .collapsing{position:relative; flex:1; min-height:0}
#b5 .mp{
position:absolute; top:0; bottom:0; overflow:hidden;
border:1px solid var(--green-deep);
background:linear-gradient(180deg, rgba(3,20,14,.7), rgba(2,8,6,.9));
transition:left .8s cubic-bezier(.6,0,.2,1), width .8s cubic-bezier(.6,0,.2,1), opacity .6s ease;
}
#b5 .mp .ptitle{font-size:clamp(9px,1.4vh,13px); padding:3px 8px; border-bottom:1px solid}
#b5 .mp.p1{border-color:var(--claude)} #b5 .mp.p1 .ptitle{color:var(--claude);border-color:var(--claude)}
#b5 .mp.p2{border-color:var(--codex)} #b5 .mp.p2 .ptitle{color:var(--codex); border-color:var(--codex)}
#b5 .mp.p3{border-color:var(--gemini)} #b5 .mp.p3 .ptitle{color:var(--gemini);border-color:var(--gemini)}
#b5 .merged{
position:absolute; inset:0; display:flex; flex-direction:column;
align-items:center; justify-content:center; opacity:0; pointer-events:none;
}
#b5 .merged.on{opacity:1; transition:opacity .6s ease .1s}
#b5 pre.mergeart{
font-size:clamp(7px,1.7vh,16px); line-height:1.15; color:var(--green);
text-shadow:0 0 8px rgba(0,255,156,.5); white-space:pre; text-align:center;
}
#b5 .mergeout{margin-top:1.6vh; font-size:clamp(11px,1.75vh,15px); color:var(--green-dim); text-align:center; min-height:9vh}
#b5 .mergeout .ok{color:var(--green)} #b5 .mergeout .plus{color:var(--green)} #b5 .mergeout .minus{color:var(--red)}
#b5 .bigok{
margin-top:1.4vh; font-size:clamp(22px,5vh,60px); letter-spacing:4px; color:var(--green);
text-shadow:0 0 16px rgba(0,255,156,.6); opacity:0; transform:scale(.7);
}
#b5 .bigok.pop{opacity:1; transform:scale(1); transition:opacity .5s, transform .6s cubic-bezier(.2,1.5,.3,1)}
@media (prefers-reduced-motion: reduce){
*{animation-duration:.001s !important; animation-iteration-count:1 !important; transition-duration:.001s !important}
.scanlines,.flicker{display:none}
.cur{animation:none; opacity:1}
}
</style>
</head>
<body>
<div id="stage" tabindex="0">
<!-- ============ BEAT 1 : TITLE ============ -->
<section class="slide" id="b1">
<div class="boot" id="bootlog"></div>
<div class="banner">
<pre class="ascii reveal" id="asciiBanner"></pre>
<div class="sub reveal">// ONE REPO, N CODING AGENTS</div>
<div class="agents3">
<span class="reveal"><span class="claudeC glow">●</span> <b class="claudeC">CLAUDE</b> <span class="dim">feat/auth</span></span>
<span class="reveal"><span class="codexC glow">●</span> <b class="codexC">CODEX</b> <span class="dim">feat/api</span></span>
<span class="reveal"><span class="geminiC glow">●</span> <b class="geminiC">GEMINI</b> <span class="dim">feat/ui</span></span>
</div>
</div>
</section>
<!-- ============ BEAT 2 : COLLISION ============ -->
<section class="slide" id="b2">
<div class="beathead"><span class="n">N</span> agents, one directory</div>
<div class="wrap">
<div class="pane file collide">
<div class="ptitle"><span class="dim">0</span> <span class="tag">~/repo/src/auth.ts</span> <span class="dim">— 1 window · 3 writers</span></div>
<div class="pbody" id="collideBody">
<div class="overlay-flash" id="owFlash">⚠ SILENT OVERWRITE ⚠</div>
</div>
</div>
<div class="side">
<div class="who"><span class="claudeC glow">● claude</span> <span class="dim">writing auth.ts</span>
<div class="bar"><i style="background:var(--claude)" id="w1"></i></div></div>
<div class="who"><span class="codexC glow">● codex</span> <span class="dim">writing auth.ts</span>
<div class="bar"><i style="background:var(--codex)" id="w2"></i></div></div>
<div class="who"><span class="geminiC glow">● gemini</span> <span class="dim">writing auth.ts</span>
<div class="bar"><i style="background:var(--gemini)" id="w3"></i></div></div>
<div class="who" style="border-color:var(--red)"><span class="red glow">last write wins →</span>
<div class="dim" id="whoWon" style="margin-top:4px">…</div></div>
</div>
</div>
<div class="caption"><span class="mut">No error. No conflict.</span> Just missing code.</div>
</section>
<!-- ============ BEAT 3 : SPLIT (hero) ============ -->
<section class="slide" id="b3">
<div class="beathead">One repo <span class="dim">→</span> <span class="glow">N working trees</span></div>
<div class="grid" id="splitGrid">
<div class="gp single in p0" id="gp0">
<div class="ptitle"><span class="dim">0:</span> main <span class="dim">— 1 window</span></div>
<div class="pbody">
<span class="dim">$</span> git worktree add …<span class="cur"></span>
</div>
</div>
<div class="gp p1" id="gp1"><div class="ptitle"><span>●</span> feat/auth <span class="dim">· claude</span></div><div class="pbody">../auth · HEAD@feat/auth<br><span class="dim">private index ✓</span></div></div>
<div class="gp p2" id="gp2"><div class="ptitle"><span>●</span> feat/api <span class="dim">· codex</span></div><div class="pbody">../api · HEAD@feat/api<br><span class="dim">private index ✓</span></div></div>
<div class="gp p3" id="gp3"><div class="ptitle"><span>●</span> feat/ui <span class="dim">· gemini</span></div><div class="pbody">../ui · HEAD@feat/ui<br><span class="dim">private index ✓</span></div></div>
<svg class="spokes" id="spokes" preserveAspectRatio="none"></svg>
<div class="divV" id="divV"></div>
<div class="divH" id="divH"></div>
<div class="gitnode" id="gitnode">.git<small>object DB<br>+ refs</small></div>
</div>
<div class="caps">
<span>◆ <b>Shared object DB + refs</b> — no re-clone</span>
<span>◆ <b>Per-worktree HEAD + index</b></span>
</div>
</section>
<!-- ============ BEAT 4 : WIRING ============ -->
<section class="slide" id="b4">
<div class="beathead">Wiring up the agents</div>
<div class="grid" id="wireGrid">
<div class="pane wp p1"><div class="ptitle"><span>●</span> feat/auth <span class="dim">· claude</span></div><div class="pbody" id="wp1"></div></div>
<div class="pane wp p2"><div class="ptitle"><span>●</span> feat/api <span class="dim">· codex</span></div><div class="pbody" id="wp2"></div></div>
<div class="pane wp p3"><div class="ptitle"><span>●</span> feat/ui <span class="dim">· gemini</span></div><div class="pbody" id="wp3"></div></div>
</div>
<div class="caption"><span class="mut">Private index →</span> no <b>.git/index.lock</b> fights <span class="mut">·</span> silent overwrites become real <b>merge conflicts</b></div>
</section>
<!-- ============ BEAT 5 : MERGE ============ -->
<section class="slide" id="b5">
<div class="beathead">Merging it all back</div>
<div class="stagewrap">
<div class="collapsing" id="collapseWrap">
<div class="mp p1" id="mp1"><div class="ptitle">● feat/auth</div><div class="pbody" style="font-size:clamp(9px,1.4vh,13px);color:var(--green-dim);padding:8px">+ auth.ts<br>+ jwt.ts<br><span class="hash">a1f9c02</span></div></div>
<div class="mp p2" id="mp2"><div class="ptitle">● feat/api</div><div class="pbody" style="font-size:clamp(9px,1.4vh,13px);color:var(--green-dim);padding:8px">+ api.ts<br>+ routes.ts<br><span class="hash">7d31be4</span></div></div>
<div class="mp p3" id="mp3"><div class="ptitle">● feat/ui</div><div class="pbody" style="font-size:clamp(9px,1.4vh,13px);color:var(--green-dim);padding:8px">+ App.tsx<br>+ theme.css<br><span class="hash">e0b8a55</span></div></div>
<div class="merged" id="mergedBox">
<pre class="mergeart"> feat/auth ─┐
feat/api ─┼──▶ main ✓
feat/ui ─┘</pre>
<div class="bigok" id="bigok">MERGED ✓</div>
<div class="mergeout" id="mergeout"></div>
</div>
</div>
</div>
<div class="caption">Small PRs <span class="mut">→</span> stacked <span class="mut">→</span> merge queue</div>
</section>
<!-- ============ CHROME ============ -->
<div id="progress"></div>
<div id="statusbar">
<div class="seg session" id="stSession">worktrees</div>
<div class="seg winlist" id="stWins"></div>
<div class="spacer"></div>
<div class="seg wcount" id="stCount">1 win</div>
<div class="seg clock" id="stClock">--:--</div>
</div>
<div class="scanlines"></div>
<div class="flicker"></div>
</div>
<script>
(function(){
"use strict";
const REDUCED = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const stage = document.getElementById("stage");
const slides = Array.from(document.querySelectorAll(".slide"));
const TOTAL = slides.length;
let cur = 0;
let timers = [];
function after(ms, fn){ const id=setTimeout(fn, REDUCED?Math.min(ms,20):ms); timers.push(id); return id; }
function every(ms, fn){ const id=setInterval(fn, ms); timers.push(id); return id; }
function clearTimers(){ timers.forEach(t=>{clearTimeout(t);clearInterval(t);}); timers=[]; }
const rndHash = ()=> Array.from({length:7},()=> "0123456789abcdef"[Math.floor(Math.random()*16)]).join("");
/* ---------- progress dots ---------- */
const prog = document.getElementById("progress");
slides.forEach((_,i)=>{ const d=document.createElement("div"); d.className="dot"; prog.appendChild(d); });
const lbl=document.createElement("div"); lbl.className="lbl"; prog.appendChild(lbl);
const dots = Array.from(prog.querySelectorAll(".dot"));
/* ---------- status bar ---------- */
const stWins=document.getElementById("stWins"), stCount=document.getElementById("stCount"), stClock=document.getElementById("stClock");
const WINSETS = {
single: [["main",true]],
triple: [["main",false],["auth",true],["api",false],["ui",false]],
};
function setWins(set, count){
stWins.innerHTML="";
set.forEach(([name,cur],i)=>{
const w=document.createElement("div"); w.className="win"+(cur?" cur":"");
w.textContent = i+":"+name; stWins.appendChild(w);
});
stCount.textContent = count;
}
function tickClock(){
const d=new Date();
stClock.textContent = String(d.getHours()).padStart(2,"0")+":"+String(d.getMinutes()).padStart(2,"0");
}
tickClock(); setInterval(tickClock, 15000);
/* ---------- typewriter helper ---------- */
function typewriter(el, text, opts={}){
return new Promise(res=>{
const speed = opts.speed || 26;
const cursorClass = opts.cursor || "cur";
let i=0;
const cursor = document.createElement("span"); cursor.className=cursorClass;
el.appendChild(cursor);
if(REDUCED){ cursor.remove(); el.insertAdjacentText("beforeend", text); res(); return; }
const id=every(speed, ()=>{
if(i>=text.length){ clearInterval(id); if(!opts.keepCursor) cursor.remove(); res(); return; }
cursor.insertAdjacentText("beforebegin", text[i]); i++;
});
});
}
/* ========================================================
BEAT 1
======================================================== */
const BANNER =
" ██████╗ ██╗████████╗ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗████████╗██████╗ ███████╗███████╗███████╗\n"+
"██╔════╝ ██║╚══██╔══╝ ██║ ██║██╔═══██╗██╔══██╗██║ ██╔╝╚══██╔══╝██╔══██╗██╔════╝██╔════╝██╔════╝\n"+
"██║ ███╗██║ ██║ ██║ █╗ ██║██║ ██║██████╔╝█████╔╝ ██║ ██████╔╝█████╗ █████╗ ███████╗\n"+
"██║ ██║██║ ██║ ██║███╗██║██║ ██║██╔══██╗██╔═██╗ ██║ ██╔══██╗██╔══╝ ██╔══╝ ╚════██║\n"+
"╚██████╔╝██║ ██║ ╚███╔███╔╝╚██████╔╝██║ ██║██║ ██╗ ██║ ██║ ██║███████╗███████╗███████║\n"+
" ╚═════╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝";
const BOOT = [
["mounting object database ........", "OK"],
["scanning refs/heads .............", "OK"],
["spawning tmux session 'worktrees'", "OK"],
["attaching coding agents x3 ......", "OK"],
];
function beat1(){
const log=document.getElementById("bootlog"); log.innerHTML="";
const banner=document.getElementById("asciiBanner"); banner.textContent="";
const reveals=slides[0].querySelectorAll(".reveal"); reveals.forEach(r=>r.classList.remove("show"));
let step=0;
(function next(){
if(step>=BOOT.length){ after(180, showBanner); return; }
const [txt,ok]=BOOT[step]; const line=document.createElement("div");
line.innerHTML = "<span class='dim'>[boot] </span>"+txt+" ";
log.appendChild(line);
after(REDUCED?10:210, ()=>{ line.innerHTML += "<span class='ok glow'>["+ok+"]</span>"; step++; next(); });
})();
function showBanner(){
banner.textContent=BANNER;
reveals[0].classList.add("show");
let r=1;
const id=every(REDUCED?10:230, ()=>{ if(r>=reveals.length){clearInterval(id);return;} reveals[r].classList.add("show"); r++; });
}
}
/* ========================================================
BEAT 2 — COLLISION
======================================================== */
const AGENTS = [
{k:"claude", c:"claudeC", cur:"c", won:"claude"},
{k:"codex", c:"codexC", cur:"x"},
{k:"gemini", c:"geminiC", cur:"g"},
];
// each agent contributes lines to the SAME file
const CONTRIB = {
claude:[ "export function login(u, p){", " const t = signJWT(u); // claude", " return { token: t };","}" ],
codex:[ "export function refresh(tok){", " return rotate(tok); // codex","}" ],
gemini:[ "export const guard = (req) => {", " return verify(req.token); // gemini","}" ],
};
function beat2(){
const body=document.getElementById("collideBody");
const flash=document.getElementById("owFlash");
document.getElementById("whoWon").textContent="…";
// keep flash overlay, clear the rest
Array.from(body.querySelectorAll(".ln")).forEach(n=>n.remove());
["w1","w2","w3"].forEach(id=>{ const b=document.getElementById(id); b.style.width="0"; b.style.transition="none"; });
// interleave writes chaotically
let queue=[];
AGENTS.forEach(a=>CONTRIB[a.k].forEach(t=>queue.push({a, t})));
// shuffle-ish interleave
queue = queue.sort(()=>Math.random()-0.5);
let i=0;
// grow write bars
after(60, ()=>{ ["w1","w2","w3"].forEach((id,ix)=>{ const b=document.getElementById(id); b.style.transition="width 2.4s linear"; b.style.width="100%"; });});
const step=REDUCED?12:230;
const wid=every(step, ()=>{
if(i>=queue.length){ clearInterval(wid); after(REDUCED?20:420, collide); return; }
const {a,t}=queue[i]; i++;
const ln=document.createElement("div"); ln.className="ln "+a.c;
ln.dataset.agent=a.k; ln.textContent=t;
body.appendChild(ln);
});
function collide(){
// glitch + flash
body.parentElement.classList.remove("glitch"); void body.offsetWidth; body.parentElement.classList.add("glitch");
flash.classList.remove("fire"); void flash.offsetWidth; flash.classList.add("fire");
// pick a survivor (last write wins) -> claude
const survivor="claude";
document.getElementById("whoWon").innerHTML = "<span class='claudeC glow'>claude</span> wrote last — <span class='red'>codex + gemini gone</span>";
after(REDUCED?20:520, ()=>{
body.querySelectorAll(".ln").forEach(ln=>{
if(ln.dataset.agent!==survivor) ln.classList.add("vanish");
else ln.classList.add("survive");
});
});
}
}
/* ========================================================
BEAT 3 — SPLIT (hero)
======================================================== */
function beat3(){
const gp0=document.getElementById("gp0");
const gps=[document.getElementById("gp1"),document.getElementById("gp2"),document.getElementById("gp3")];
const divV=document.getElementById("divV"), divH=document.getElementById("divH");
const git=document.getElementById("gitnode");
const spokes=document.getElementById("spokes");
// reset
gp0.style.display="flex"; gp0.classList.add("in");
gps.forEach(g=>g.classList.remove("in"));
divV.style.height="0"; divH.style.width="0";
git.classList.remove("on");
spokes.innerHTML="";
setWins(WINSETS.single, "1 win");
// 1) vertical split (Ctrl-b %)
after(REDUCED?10:520, ()=>{
divV.style.transition = REDUCED?"none":"height .5s ease";
divV.style.height="100%";
});
// hide the single pane, promote grid panes
after(REDUCED?20:900, ()=>{
gp0.classList.remove("in");
after(REDUCED?10:260, ()=>{ gp0.style.display="none"; });
// horizontal split (Ctrl-b ")
divH.style.transition = REDUCED?"none":"width .5s ease";
divH.style.width="100%";
});
// 2) panes slide in staggered
const order=[0,1,2];
order.forEach((idx,n)=>{
after(REDUCED?20:1150 + n*220, ()=>{ gps[idx].classList.add("in"); setWins(WINSETS.triple, (n+1)+" wins"); });
});
// 3) git node + spokes glow, connecting the three
after(REDUCED?30:2100, ()=>{
git.classList.add("on");
// draw spokes from center to each pane center
const rect=spokes.getBoundingClientRect();
const cx=rect.width/2, cy=rect.height/2;
const targets=[[rect.width*0.25,rect.height*0.28],[rect.width*0.75,rect.height*0.28],[rect.width*0.5,rect.height*0.76]];
spokes.setAttribute("viewBox","0 0 "+rect.width+" "+rect.height);
targets.forEach((t,ti)=>{
const l=document.createElementNS("http://www.w3.org/2000/svg","line");
l.setAttribute("x1",cx); l.setAttribute("y1",cy);
l.setAttribute("x2",t[0]); l.setAttribute("y2",t[1]);
spokes.appendChild(l);
after(REDUCED?10:140*ti, ()=>l.classList.add("on"));
});
});
}
/* ========================================================
BEAT 4 — WIRING
======================================================== */
const WIRE = [
{sel:"wp1", prm:"prm-c", user:"claude@auth", dir:"~/auth",
cmds:["git worktree add -b feat/auth ../auth main","claude -w feature-auth"],
out:["Preparing worktree (new branch 'feat/auth')","HEAD is now at 3e91a0c main"]},
{sel:"wp2", prm:"prm-x", user:"codex@api", dir:"~/api",
cmds:["git worktree add -b feat/api ../api main","codex -w feature-api"],
out:["Preparing worktree (new branch 'feat/api')","HEAD is now at 3e91a0c main"]},
{sel:"wp3", prm:"prm-g", user:"gemini@ui", dir:"~/ui",
cmds:["git worktree add -b feat/ui ../ui main","gemini -w feature-ui"],
out:["Preparing worktree (new branch 'feat/ui')","HEAD is now at 3e91a0c main"]},
];
function beat4(){
setWins(WINSETS.triple, "3 wins");
WIRE.forEach((w,ix)=>{ document.getElementById(w.sel).innerHTML=""; });
WIRE.forEach((w,ix)=>{ after(REDUCED?10:ix*300, ()=>runPane(w)); });
async function runPane(w){
const body=document.getElementById(w.sel);
const prompt = ()=> "<span class='"+w.prm+"'>"+w.user+"</span>:<span class='dim'>"+w.dir+"</span>$ ";
for(let ci=0; ci<w.cmds.length; ci++){
const line=document.createElement("div"); line.className="cmd";
line.innerHTML=prompt(); body.appendChild(line);
await typewriter(line, w.cmds[ci], {speed:REDUCED?1:34, cursor:"cur "+w.prm.replace("prm-","")});
// output
const o=document.createElement("div"); o.className="out"; o.textContent=w.out[ci]||"";
body.appendChild(o);
await new Promise(r=>after(REDUCED?10:180, r));
}
// scroll commit hashes as agent "works"
const worklbl=document.createElement("div"); worklbl.className="out amber"; worklbl.textContent="● working…"; body.appendChild(worklbl);
let n=0;
const acts=["feat: routes","refactor: guard","test: token","fix: expiry","chore: lint","feat: schema"];
const id=every(REDUCED?60:520, ()=>{
if(n>=6){ clearInterval(id); return; }
const h=document.createElement("div"); h.className="hashline out";
h.innerHTML="<span class='hash'>"+rndHash()+"</span> "+acts[n%acts.length];
body.appendChild(h);
void h.offsetWidth; h.classList.add("show");
// keep pane scrolled
body.scrollTop = body.scrollHeight;
n++;
});
}
}
/* ========================================================
BEAT 5 — MERGE
======================================================== */
function beat5(){
const wrap=document.getElementById("collapseWrap");
const mps=[document.getElementById("mp1"),document.getElementById("mp2"),document.getElementById("mp3")];
const box=document.getElementById("mergedBox");
const bigok=document.getElementById("bigok");
const out=document.getElementById("mergeout");
box.classList.remove("on"); bigok.classList.remove("pop"); out.innerHTML="";
setWins(WINSETS.triple, "3 wins");
// lay out three panes side by side
const W=wrap.clientWidth;
const positions=[[0,32],[34,32],[68,32]]; // left%, width%
mps.forEach((mp,i)=>{
mp.style.transition="none"; mp.style.opacity="1"; mp.style.display="flex";
mp.style.left=positions[i][0]+"%"; mp.style.width=positions[i][1]+"%";
});
// collapse into center
after(REDUCED?10:480, ()=>{
mps.forEach((mp,i)=>{
mp.style.transition="left .8s cubic-bezier(.6,0,.2,1), width .8s cubic-bezier(.6,0,.2,1), opacity .6s ease";
mp.style.left="33%"; mp.style.width="34%";
if(i!==1){ after(REDUCED?10:560, ()=>{ mp.style.opacity="0"; }); }
});
setWins(WINSETS.single, "1 win");
});
// reveal merged art + typewriter git output
after(REDUCED?30:1300, ()=>{
mps.forEach(mp=>{ mp.style.opacity="0"; });
box.classList.add("on");
after(REDUCED?10:280, ()=>bigok.classList.add("pop"));
const OUT=[
"$ git switch main && git merge --no-ff feat/auth feat/api feat/ui",
"Merging feat/auth feat/api feat/ui into main",
"Fast-forward resolved · 3 branches",
" 6 files changed, <span class='plus'>+412</span> / <span class='minus'>-18</span>",
"<span class='ok'>✓ merge queue: all green</span>",
];
let li=0;
const id=every(REDUCED?40:360, ()=>{
if(li>=OUT.length){ clearInterval(id); return; }
const d=document.createElement("div"); d.innerHTML=OUT[li]; out.appendChild(d); li++;
});
});
}
/* ========================================================
SLIDE ENGINE
======================================================== */
const ENTER=[beat1,beat2,beat3,beat4,beat5];
function show(n){
n=Math.max(0, Math.min(TOTAL-1, n));
cur=n;
clearTimers();
slides.forEach((s,i)=>s.classList.toggle("active", i===n));
dots.forEach((d,i)=>d.classList.toggle("on", i===n));
lbl.textContent=(n+1)+" / "+TOTAL;
// status default per beat is set inside enter fns; ensure baseline
if(n===0){ setWins(WINSETS.single,"1 win"); }
// restart entrance animation
ENTER[n]();
}
function nextSlide(){ if(cur<TOTAL-1) show(cur+1); }
function prevSlide(){ if(cur>0) show(cur-1); }
stage.addEventListener("click", (e)=>{ nextSlide(); });
window.addEventListener("keydown", (e)=>{
const k=e.key;
if(k==="ArrowRight"||k===" "||k==="Spacebar"){ e.preventDefault(); nextSlide(); }
else if(k==="ArrowLeft"){ e.preventDefault(); prevSlide(); }
else if(k==="1"||k==="2"||k==="3"){
try{ window.parent.postMessage({type:"switchVariant", key:({"1":"a","2":"b","3":"c"})[k]}, "*"); }catch(err){}
}
});
// boot
show(0);
})();
</script>
</body>
</html>