unlost 0.20.3

Unlost - Local-first code memory for a workspace.
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
  <title>Unlost - Ownership isn't authorship anymore</title>

  <meta name="description" content="Agents write the code. You carry the consequences. Unlost keeps the context that lived in the agent close to you - so you can own the work, not just approve it.">

  <meta property="og:title" content="Unlost">
  <meta property="og:description" content="Agents write the code. You carry the consequences. Unlost keeps the context that lived in the agent close to you.">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://unlost.unfault.dev/">
  <meta property="og:image" content="https://unlost.unfault.dev/og.png">
  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" content="630">

  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:title" content="Unlost">
  <meta name="twitter:description" content="Agents write the code. You carry the consequences. Unlost keeps the context that lived in the agent close to you.">
  <meta name="twitter:image" content="https://unlost.unfault.dev/og.png">
  <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&family=Lexend:wght@300;400;500;600;700&display=swap" rel="stylesheet">

  <style type="text/tailwindcss">
    @theme {
      --color-midnight-violet-950: oklch(15.25% 0.040 290.85);
      --color-midnight-violet-900: oklch(17.89% 0.053 288.32);
      --color-midnight-violet-800: oklch(25.80% 0.095 286.19);
      --color-fiery-terracotta: #E74F26;
      --color-tan: #D1B487;
      --font-sans: 'Inter', system-ui, sans-serif;
      --font-display: 'Lexend', system-ui, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
    }

    @layer base {
      html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
      }
      body {
        @apply bg-white text-midnight-violet-950 font-sans antialiased;
        font-feature-settings: 'liga' 1, 'calt' 1;
        overflow-x: hidden;
      }
      h1, h2, h3, h4, h5, h6 {
        @apply font-medium tracking-tight;
        font-family: 'Lexend', system-ui, sans-serif;
      }
      code {
        @apply bg-midnight-violet-950/5 px-1.5 py-0.5 rounded text-sm font-mono;
        word-break: break-word;
      }
      pre {
        @apply bg-midnight-violet-950 text-white p-4 sm:p-5 rounded-lg overflow-x-auto font-mono text-xs sm:text-sm leading-relaxed;
        -webkit-overflow-scrolling: touch;
      }
      pre code {
        @apply bg-transparent p-0;
        word-break: normal;
        white-space: pre;
      }
    }

    @layer components {
      .section {
        @apply py-12 sm:py-16 lg:py-20 px-4 sm:px-6 lg:px-8;
      }
      .container-narrow {
        @apply max-w-2xl mx-auto px-4 sm:px-0;
      }
      .terminal {
        @apply bg-midnight-violet-950 rounded-lg p-4 sm:p-5 font-mono text-xs sm:text-sm;
        -webkit-overflow-scrolling: touch;
      }
    }
  </style>
</head>
<body>
  <!-- Navigation -->
  <nav id="navbar" class="fixed top-0 left-0 right-0 z-50 bg-white transition-all duration-300">
    <div class="max-w-2xl mx-auto px-4 py-3 sm:py-4 flex items-center justify-between">
      <a href="#" class="text-midnight-violet-950 font-medium text-lg">unlost</a>
      <div class="flex items-center gap-2 sm:gap-4">
        <div class="hidden md:flex items-center gap-6 text-sm">
          <a href="#install" class="text-midnight-violet-950/70 hover:text-fiery-terracotta transition-colors">Install</a>
          <a href="#commands" class="text-midnight-violet-950/70 hover:text-fiery-terracotta transition-colors">Commands</a>
          <a href="#reflect" class="text-midnight-violet-950/70 hover:text-fiery-terracotta transition-colors">Reflect</a>
        </div>
        <a href="https://github.com/unfault/unlost" class="inline-flex items-center px-3 py-1.5 sm:px-4 sm:py-2 text-sm font-medium text-white bg-midnight-violet-950 rounded-lg hover:bg-midnight-violet-800 transition-colors">GitHub</a>
      </div>
    </div>
  </nav>

  <script>
    const navbar = document.getElementById('navbar');
    window.addEventListener('scroll', () => {
      if (window.scrollY > 10) {
        navbar.classList.add('bg-white/90', 'backdrop-blur-sm', 'shadow-sm');
      } else {
        navbar.classList.remove('bg-white/90', 'backdrop-blur-sm', 'shadow-sm');
      }
    });
  </script>

  <!-- Hero -->
  <section class="section pt-24 sm:pt-28 lg:pt-32">
    <div class="container-narrow">
      <h1 class="text-3xl sm:text-4xl md:text-5xl lg:text-6xl mb-4 sm:mb-6 leading-tight font-medium">
        AI gets code authorship.<br><span class="text-fiery-terracotta">Context ownership</span> stays with you.
      </h1>
      
      <p class="text-lg sm:text-xl text-midnight-violet-950/60 mb-6 sm:mb-8 leading-relaxed">
        Agents write the code. You carry the consequences. Unlost keeps
        the context that used to live in your head - and now lives in
        the agent - close to you.
      </p>

      <div class="mb-10 sm:mb-14">
        <div class="mb-3">
          <pre class="cursor-pointer hover:bg-midnight-violet-900 transition-colors relative group" onclick="navigator.clipboard.writeText('curl -fsSL https://unlost.unfault.dev/install.sh | bash'); this.querySelector('.copy-msg').classList.remove('opacity-0'); setTimeout(() => this.querySelector('.copy-msg').classList.add('opacity-0'), 2000);"><code>curl -fsSL https://unlost.unfault.dev/install.sh | bash</code><span class="copy-msg absolute right-4 top-1/2 -translate-y-1/2 text-xs text-white/40 opacity-0 transition-opacity">Copied</span></pre>
        </div>
        <div class="flex flex-col sm:flex-row sm:items-center justify-between text-xs sm:text-sm text-midnight-violet-950/50 gap-2">
          <span>For Windows, please download the binary from our <a href="https://github.com/unfault/unlost/releases" class="text-fiery-terracotta hover:underline">releases page</a>.</span>
          <a href="#install" class="hover:text-fiery-terracotta transition-colors flex items-center gap-1">
            Setup guide <span class="text-[10px]">↓</span>
          </a>
        </div>
      </div>

      <div class="grid grid-cols-1 sm:grid-cols-3 gap-3 sm:gap-4 mb-12 sm:mb-16">
        <div class="rounded-xl border-l-2 border-[#E74F26]/50 p-4 sm:p-5">
          <div class="text-base sm:text-lg font-semibold mb-2" font-['Lexend']>Privacy First</div>
          <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
            Capsules and indexes stay on your machine.
          </p>
        </div>

        <div class="rounded-xl border-l-2 border-[#E74F26]/50 p-4 sm:p-5">
          <div class="text-base sm:text-lg font-semibold mb-2" font-['Lexend']>Open-Source</div>
          <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
            Built in the open under a MIT license.
          </p>
        </div>

        <div class="rounded-xl border-l-2 border-[#E74F26]/50 p-4 sm:p-5">
          <div class="text-base sm:text-lg font-semibold mb-2" font-['Lexend']>Non-Blocking</div>
          <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
            Journaling returns immediately; heavy work runs async.
          </p>
        </div>
      </div>
    </div>
    <div class="container-narrow">
      <p class="text-center text-sm font-medium tracking-widest uppercase text-midnight-violet-950/40 mb-8">Any agent. One shared memory.</p>
      <div class="flex flex-col sm:flex-row items-center justify-around gap-10 sm:gap-4">
        <div class="flex items-center justify-center h-10">
          <img src="public/claude-3.svg" alt="Claude Code" class="h-full object-contain opacity-90">
        </div>

        <div class="flex items-center justify-center h-10 text-midnight-violet-950/70 font-['Lexend'] font-medium text-sm tracking-tight">
          Claude Cowork
        </div>

        <div class="flex items-center justify-center h-10">
          <img src="public/opencode-wordmark-simple-light.svg" alt="OpenCode" class="h-full object-contain opacity-90">
        </div>

        <div class="flex items-center justify-center h-10 text-midnight-violet-950/90">
          <svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 154 24" xmlns="http://www.w3.org/2000/svg" class="h-5"><title>GitHub Copilot</title><path d="M2 11.875c0 5.256 3.013 8.506 8.19 8.506 4.76 0 8.027-2.72 8.027-7.722v-1.545h-7.982v2.928h4.095c-.161 1.96-1.68 3.25-4.049 3.25-2.6 0-4.347-1.498-4.347-4.334V10.7c0-2.582 1.518-4.31 4.186-4.31 1.91 0 3.267.922 3.68 2.374h3.865c-.437-3.366-3.427-5.625-7.499-5.625C5.29 3.138 2 6.366 2 11.875zm17.308-5.44h3.496V3h-3.496v3.435zm0 13.715h3.496V7.795h-3.496V20.15zm10.544-9.52h2.438V7.795h-2.438V3.922h-3.496v3.873H24.17v2.835h2.186v6.8c0 1.637.69 2.72 2.76 2.72h3.174v-2.766h-2.438V10.63zm3.994 9.52h3.727v-7.076h7.568v7.076h3.726V3.346h-3.726v6.777h-7.568V3.346h-3.727V20.15zM62.385 7.795h-3.497v6.523c0 1.868-1.012 3.205-2.668 3.205-1.38 0-2.162-.83-2.162-2.56V7.796h-3.52v7.722c0 2.95 1.357 4.864 4.118 4.864 1.955 0 3.29-.945 4.002-2.49h.207l.46 2.26h3.06V7.794zm1.698 12.355h3.06l.436-2.213h.207c.713 1.591 2.3 2.444 4.072 2.444 3.174 0 5.015-2.374 5.015-6.385 0-4.057-1.887-6.432-5.084-6.432-1.978 0-3.428 1.014-4.003 2.49h-.207V3h-3.496v17.15zm3.496-5.624v-1.06c0-1.845 1.173-3.043 2.99-3.043 1.657 0 2.738.853 2.738 2.581v1.983c0 1.521-.874 2.559-2.714 2.559-1.864 0-3.014-1.222-3.014-3.02zm21.8 5.855c4.21 0 7.177-2.351 7.683-6.063h-3.151c-.46 2.098-2.186 3.389-4.486 3.389-2.852 0-4.67-1.867-4.67-4.518v-2.743c0-2.882 1.887-4.634 4.716-4.634 2.53 0 4.072 1.36 4.44 3.366h3.151c-.368-3.665-3.243-6.063-7.499-6.063-5.038 0-7.982 3.274-7.982 8.668 0 5.348 2.898 8.598 7.798 8.598zm8.533-6.34c0 3.92 2.346 6.34 5.98 6.34 3.796 0 6.004-2.536 6.004-6.34 0-4.056-2.484-6.338-6.003-6.338-3.635 0-5.981 2.397-5.981 6.339zm2.898.992V13.12c0-1.89 1.22-3.066 3.083-3.066 1.817 0 3.082 1.152 3.082 3.066v1.913c0 1.96-1.288 2.997-3.082 2.997-1.749 0-3.083-1.015-3.083-2.997zM111.018 24h2.853v-6.132h.184c.667 1.453 2.116 2.398 4.186 2.398 3.083 0 4.992-2.26 4.992-6.293 0-3.942-1.863-6.27-4.992-6.27-1.863 0-3.427.852-4.186 2.397h-.184l-.345-2.167h-2.508V24zm6.211-6.063c-2.024 0-3.358-1.314-3.358-3.342v-1.222c0-2.005 1.31-3.342 3.381-3.342 2.002 0 3.037 1.152 3.037 2.881v2.144c0 1.815-1.16 2.849-2.973 2.88l-.087.001zm7.1-11.733h2.83V3.115h-2.83v3.09zm0 13.946h2.83V7.933h-2.83V20.15zm4.338 0h2.83V3.115h-2.83V20.15zm9.927-12.447c3.52 0 6.004 2.282 6.004 6.339 0 3.803-2.208 6.339-6.004 6.339-3.634 0-5.98-2.42-5.98-6.34 0-3.941 2.346-6.338 5.98-6.338zm10.922-3.689v3.919H152v2.328h-2.484v7.607H152v2.282h-2.99c-1.749 0-2.324-.922-2.324-2.282v-7.607h-2.185V7.933h2.185V4.014h2.83zm-10.922 6.04c-1.863 0-3.082 1.175-3.082 3.066v1.913c0 1.982 1.334 2.997 3.082 2.997 1.795 0 3.083-1.038 3.083-2.997V13.12c0-1.914-1.265-3.066-3.083-3.066z"/></svg>
        </div>
      </div>
    </div>
  </section>

  <!-- The Problem -->
  <section id="problem" class="section">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-8 sm:mb-12 flex items-baseline flex-wrap gap-2">
        When it matters
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>
      <p class="text-lg sm:text-xl text-midnight-violet-950/60 mb-8 sm:mb-12 leading-relaxed">
        It used to be that writing the code meant understanding it. That's
        changed. These are the moments where the gap shows.
      </p>
      <div class="space-y-8 sm:space-y-10">
        <div>
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-2 gap-1 sm:gap-0">
            <div class="text-xl sm:text-2xl font-bold text-midnight-violet-950 transform -skew-x-6">A colleague asks why</div>
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta"><code>unlost brief</code> / <code>unlost trace</code></h3>
          </div>
          <p class="text-midnight-violet-950/70 leading-relaxed">
            You know it works. You're less sure you can explain it. The
            reasoning was in the chat, which is gone.
          </p>
        </div>

        <div>
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-2 gap-1 sm:gap-0">
            <div class="text-xl sm:text-2xl font-bold text-midnight-violet-950 transform -skew-x-6">Six months later</div>
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta"><code>unlost trace</code> / <code>unlost challenge</code></h3>
          </div>
          <p class="text-midnight-violet-950/70 leading-relaxed">
            Someone needs to change it. Maybe it's you. The agent doesn't
            remember. The commit message says "feat: add retry logic."
          </p>
        </div>

        <div>
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-2 gap-1 sm:gap-0">
            <div class="text-xl sm:text-2xl font-bold text-midnight-violet-950 transform -skew-x-6">Production is down</div>
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta"><code>unlost trace</code> / <code>unlost brief</code></h3>
          </div>
          <p class="text-midnight-violet-950/70 leading-relaxed">
            You're reading code under pressure that you didn't write. You
            don't know if the retry logic was intentional or a guess.
          </p>
        </div>

        <div>
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-2 gap-1 sm:gap-0">
            <div class="text-xl sm:text-2xl font-bold text-midnight-violet-950 transform -skew-x-6">The PR is the handoff</div>
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta"><code>unlost pr-comment</code></h3>
          </div>
          <p class="text-midnight-violet-950/70 leading-relaxed">
            To your team, and to your future self. The diff shows what
            changed. It doesn't show what was tried and rejected, what
            constraint you were navigating, what's still open.
          </p>
        </div>

        <div>
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-2 gap-1 sm:gap-0">
            <div class="text-xl sm:text-2xl font-bold text-midnight-violet-950 transform -skew-x-6">The context you didn't know you needed</div>
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta"><code>unlost trace</code> (proactive)</h3>
          </div>
          <p class="text-midnight-violet-950/70 leading-relaxed">
            You can't query what you don't remember. When a new change echoes a past decision, the recurrence channel surfaces the dormant capsule — before you ask, before you repeat a mistake.
          </p>
        </div>
      </div>
    </div>
  </section>

  <!-- How It Works (Revised) -->
  <section id="how-it-works" class="section">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-8 sm:mb-12 flex items-baseline flex-wrap gap-2">
        How It Works 
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>
      
       <div class="space-y-12 sm:space-y-16">
          <!-- Step 1 -->
          <div id="step-01" class="flex flex-col sm:grid sm:grid-cols-12 gap-4 sm:gap-8 items-start">
            <div class="sm:col-span-2">
               <div class="text-4xl sm:text-6xl font-light text-midnight-violet-950/10 font-['Lexend']">01</div>
            </div>
            <div class="sm:col-span-10">
              <h3 class="text-lg sm:text-xl font-semibold mb-3">Record</h3>
              <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
                Unlost sits alongside your agent process. It captures the raw stream of 
                thought—intent, reasoning, and decisions—without blocking your flow.
              </p>
              <div class="mb-6">
                <a href="#silent-observer" class="text-xs font-medium text-fiery-terracotta hover:underline inline-flex items-center gap-1 group">
                  See how we capture without blocking <span class="group-hover:translate-x-0.5 transition-transform">→</span>
                </a>
              </div>
              <div class="terminal">
                <div class="text-white/40 mb-1"># Silent observation</div>
                <div class="text-white/80">Recording session ses_3a79... [active]</div>
              </div>
            </div>
          </div>
  
          <!-- Step 2 -->
          <div id="step-02" class="flex flex-col sm:grid sm:grid-cols-12 gap-4 sm:gap-8 items-start">
            <div class="sm:col-span-2">
               <div class="text-4xl sm:text-6xl font-light text-midnight-violet-950/10 font-['Lexend']">02</div>
            </div>
            <div class="sm:col-span-10">
              <h3 class="text-lg sm:text-xl font-semibold mb-3">Extract & Structure</h3>
              <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
                We don't just log text. Unlost distills messy conversations into 
                <strong>Capsules</strong>: atomic units of memory containing the 
                <em>Why</em>, the <em>What</em>, and the <em>How</em>.
              </p>
              <div class="mb-6">
                <a href="#long-memory" class="text-xs font-medium text-fiery-terracotta hover:underline inline-flex items-center gap-1 group">
                  See how the causal chain is built <span class="group-hover:translate-x-0.5 transition-transform">→</span>
                </a>
              </div>
              <div class="terminal">
                <div class="text-white/40 mb-1"># Extracted Capsule</div>
                <div class="text-white/80">{intent: "Refactor auth", decision: "Use PASETO tokens", rationale: "..."}</div>
              </div>
            </div>
          </div>
  
          <!-- Step 3 -->
          <div id="step-03" class="flex flex-col sm:grid sm:grid-cols-12 gap-4 sm:gap-8 items-start">
            <div class="sm:col-span-2">
               <div class="text-4xl sm:text-6xl font-light text-midnight-violet-950/10 font-['Lexend']">03</div>
            </div>
            <div class="sm:col-span-10">
              <h3 class="text-lg sm:text-xl font-semibold mb-3">Ground</h3>
              <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
                Every capsule is verified against the live code graph. We link decisions 
                to specific files and symbols, creating a navigable map of your project's evolution.
              </p>
              <div class="mb-6">
                 <a href="#code-graph" class="text-xs font-medium text-fiery-terracotta hover:underline inline-flex items-center gap-1 group">
                    See how we build the map <span class="group-hover:translate-x-0.5 transition-transform">→</span>
                 </a>
              </div>
              <div class="terminal">
                <div class="text-white/40 mb-1"># Graph Links</div>
                <div class="text-white/80">Linked: src/auth.rs (80% relevance) | Symbol: verify_token</div>
              </div>
            </div>
          </div>
        </div>

        <!-- Step 4 -->
        <div id="step-04" class="flex flex-col sm:grid sm:grid-cols-12 gap-4 sm:gap-8 items-start">
          <div class="sm:col-span-2">
            <div class="text-4xl sm:text-6xl font-light text-midnight-violet-950/10 font-['Lexend']">04</div>
          </div>
          <div class="sm:col-span-10">
            <h3 class="text-lg sm:text-xl font-semibold mb-3">Re-Surface</h3>
            <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
              Dormant capsules don't sit idle. When a new movement of work echoes a past decision, the recurrence channel injects a SYSTEM NOTE into the agent's context — pointing back to the original reasoning, with source provenance attached. The agent decides whether to mention it to you.
            </p>
            <div class="mb-6">
              <a href="#source-pointers" class="text-xs font-medium text-fiery-terracotta hover:underline inline-flex items-center gap-1 group">
                See how pointers work <span class="group-hover:translate-x-0.5 transition-transform">→</span>
              </a>
            </div>
            <div class="terminal">
              <div class="text-white/40 mb-1"># SYSTEM NOTE (auto-injected)</div>
              <div class="text-white/80">This continues a prior thread. On Jan 14, the decision was: "switch to HTTP/2 for upstream proxy." Source: claude+jsonl://...abc.jsonl#L47</div>
            </div>
          </div>
        </div>

        <!-- One Memory. Many Lenses. -->
          <div class="pt-8 sm:pt-12 mt-8 sm:mt-12 border-t border-midnight-violet-950/5">
             <h3 class="text-2xl sm:text-3xl font-medium mb-8 flex items-baseline flex-wrap gap-2">
                One Memory. Many Lenses.
                <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
              </h3>
             <p class="text-midnight-violet-950/60 leading-relaxed mb-10">
                Once context is grounded, you can query it from any angle.
             </p>
              <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                 <!-- Look Back -->
                 <div>
                     <h4 class="text-lg font-semibold text-fiery-terracotta mb-3">Look Back</h4>
                     <p class="text-sm text-midnight-violet-950/60 leading-relaxed mb-3">
                        Recover the context you lost. Whether it's a high-level staff engineer debrief or a specific decision trail, you get the <em>why</em> behind the code. Past context doesn't just wait for queries — it surfaces itself when it becomes relevant again.
                     </p>
                    <div class="flex flex-wrap gap-2 text-xs font-mono text-midnight-violet-950/40">
                       <span class="bg-midnight-violet-950/5 px-2 py-1 rounded">trace</span>
                       <span class="bg-midnight-violet-950/5 px-2 py-1 rounded">brief</span>
                    </div>
                 </div>

                 <!-- Challenge Present -->
                 <div>
                    <h4 class="text-lg font-semibold text-fiery-terracotta mb-3">Challenge Present</h4>
                    <p class="text-sm text-midnight-violet-950/60 leading-relaxed mb-3">
                       Don't just approve; verify. Pressure-test decisions against the graph and monitor the agent's struggle in real-time.
                    </p>
                    <div class="flex flex-wrap gap-2 text-xs font-mono text-midnight-violet-950/40">
                       <span class="bg-midnight-violet-950/5 px-2 py-1 rounded">challenge</span>
                       <span class="bg-midnight-violet-950/5 px-2 py-1 rounded">metrics</span>
                    </div>
                 </div>

                 <!-- Explore Future -->
                 <div>
                    <h4 class="text-lg font-semibold text-fiery-terracotta mb-3">Explore Future</h4>
                    <p class="text-sm text-midnight-violet-950/60 leading-relaxed mb-3">
                       Draft with memory. Use your established constraints and history to weigh new trade-offs before writing a single line of code.
                    </p>
                    <div class="flex flex-wrap gap-2 text-xs font-mono text-midnight-violet-950/40">
                       <span class="bg-midnight-violet-950/5 px-2 py-1 rounded">explore</span>
                    </div>
                 </div>

                 <!-- Review the Journey -->
                 <div>
                    <h4 class="text-lg font-semibold text-fiery-terracotta mb-3">Review the Journey</h4>
                    <p class="text-sm text-midnight-violet-950/60 leading-relaxed mb-3">
                       Reflect on how you and the agent worked together. Get actionable coaching on collaboration habits, agent drift patterns, and which skills to add or tune.
                    </p>
                    <div class="flex flex-wrap gap-2 text-xs font-mono text-midnight-violet-950/40">
                       <span class="bg-midnight-violet-950/5 px-2 py-1 rounded">reflect</span>
                    </div>
                 </div>
              </div>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- Long Memory Story Arc (Moved Up) -->
  <section id="long-memory" class="section border-t border-midnight-violet-950/5">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-4 flex items-baseline flex-wrap gap-2">
        Long Memory &amp; the Story Arc
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>
      <p class="text-lg text-midnight-violet-950/60 mb-10 leading-relaxed">
        Capsules are not just a log. They encode a <em>causal history</em> - the sequence of decisions, constraints, and failures that explain why the code looks the way it does today.
      </p>

      <div class="space-y-14">

        <!-- The problem -->
        <div>
          <h3 class="text-base sm:text-lg font-semibold mb-3">The problem with standard RAG</h3>
          <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
            Most retrieval systems return a <em>ranked bag of hits</em>. Ask "why is the timeout 30s?" and you get the five most similar capsules - but no sense of how you arrived there. Causality is lost. Sessions are mixed. Old decisions look the same as new ones.
          </p>
          <p class="text-midnight-violet-950/60 leading-relaxed">
            Engineers don't think in bags of results. They think in chains: <em>"because we switched to HTTP/2, we needed longer timeouts, which surfaced a bug in the keepalive logic, which we worked around by…"</em> That's a causal chain, and it's what <code>unlost trace</code> reconstructs.
          </p>
        </div>

        <!-- How the chain is built -->
        <div>
          <h3 class="text-base sm:text-lg font-semibold mb-3">How the causal chain is built</h3>
          <div class="space-y-6 text-midnight-violet-950/60">
            <div class="flex gap-4 items-start">
              <div class="text-2xl font-light text-midnight-violet-950/10 font-['Lexend'] shrink-0 w-8">1</div>
              <div>
                <div class="font-semibold text-midnight-violet-950mb-1">Richer embeddings</div>
                <p class="leading-relaxed mt-1">Every capsule is embedded with its <strong>category</strong>, <strong>failure mode</strong>, top symbols, and the <strong>prior decision</strong> from the same work thread. This encodes trajectory into the vector; capsules from the same causal chain cluster together in embedding space, even across different agent sessions.</p>
              </div>
            </div>
            <div class="flex gap-4 items-start">
              <div class="text-2xl font-light text-midnight-violet-950/10 font-['Lexend'] shrink-0 w-8">2</div>
              <div>
                <div class="font-semibold text-midnight-violet-950 mb-1">HyPE: question-first retrieval</div>
                <p class="leading-relaxed mt-1">When a capsule is extracted, the LLM also generates 2–3 questions the capsule answers: <em>"Why is the connection timeout 30 seconds?"</em>, <em>"How does the proxy route upstream requests?"</em>. At retrieval time, each command frames your input as a question matching its intent before embedding - <code>recall</code> asks <em>"What happened with X?"</em>, <code>challenge</code> asks <em>"Was the decision about X the right call?"</em>, <code>explore</code> asks <em>"What are the alternatives for X?"</em>, and so on. This turns retrieval into a question-to-question match against the stored questions, dramatically improving precision with zero extra LLM cost.</p>
                <p class="text-midnight-violet-950/40 text-xs mt-2 leading-relaxed">
                  Based on: Ma et al., <em>"HyPE: Hypothetical Prompt Embeddings for Improved Retrieval"</em> (2025).
                  <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5139335" class="hover:text-fiery-terracotta underline" target="_blank" rel="noopener">papers.ssrn.com/sol3/papers.cfm?abstract_id=5139335</a>
                </p>
              </div>
            </div>
            <div class="flex gap-4 items-start">
              <div class="text-2xl font-light text-midnight-violet-950/10 font-['Lexend'] shrink-0 w-8">3</div>
              <div>
                <div class="font-semibold text-midnight-violet-950 mb-1">Seed → fan-out → threshold</div>
                <p class="leading-relaxed mt-1">A vector ANN search finds the closest seed capsules. For each seed, unlost fans out to all capsules that share symbols, traversing the existing LabelList index. Capsules above the similarity threshold are dropped to prevent the chain from sprawling. The survivors are sorted chronologically: <strong>oldest first, newest last</strong>.</p>
              </div>
            </div>
          </div>
        </div>

        <!-- Session boundary problem -->
        <div>
          <h3 class="text-base sm:text-lg font-semibold mb-3">Sessions don't slice neatly</h3>
          <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
            In practice, engineers reuse the same agent session across multiple pieces of work. Session IDs are a poor proxy for "same work thread." Unlost sidesteps this by using <strong>semantic continuity</strong> instead: the prior-decision embedding means capsules that are conceptually related cluster together regardless of session boundaries. The chain reflects intent, not session structure.
          </p>
          <div class="terminal overflow-x-auto">
            <div class="text-white/40 mb-1"># same chain, different sessions, months apart</div>
            <div class="text-white/80 whitespace-nowrap">2026-01-14  [ses_a] switched to HTTP/2 for upstream</div>
            <div class="text-white/80 whitespace-nowrap">2026-01-21  [ses_a] retry spiral on keepalive, increased timeout</div>
            <div class="text-white/80 whitespace-nowrap">2026-02-03  [ses_b] timeout 30s hardcoded in proxy_request</div>
            <div class="text-white/80 whitespace-nowrap">2026-02-18  [ses_b] <span class="text-fiery-terracotta">← you are here</span></div>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- Install -->
  <section id="install" class="section">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-8 sm:mb-12 flex items-baseline flex-wrap gap-2">
        Install 
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>

      <div class="space-y-8">
        <div>
          <h3 class="text-base sm:text-lg font-semibold mb-4">Get Unlost</h3>
          <pre class="text-xs sm:text-sm"><code>curl -fsSL https://unlost.unfault.dev/install.sh | bash</code></pre>
          <small class="text-midnight-violet-950/60 block mt-2 text-sm">For Windows, please download the binary from our <a href="https://github.com/unfault/unlost/releases" class="text-fiery-terracotta hover:underline">releases</a> page.</small>
        </div>

        <div>
          <h3 class="text-base sm:text-lg font-semibold mb-4">Agent Integration</h3>
          <p class="text-midnight-violet-950/60 mb-4">
            Hook unlost into your agent. This installs the Unlost agent skill and configures the necessary hooks.
          </p>
          <pre><code># Claude Code - one command, works everywhere
unlost config agent claude --global

# Claude Cowork - per-project or global
unlost config agent cowork --path .
unlost config agent cowork --global

# OpenCode - opt-in per repository
cd your-project
unlost config agent opencode --path .

# GitHub Copilot CLI - opt-in per repository
cd your-project
unlost config agent copilot --path .

# Any MCP-aware agent (Claude Code, OpenCode, Copilot, Cowork, or any MCP host)
unlost config agent mcp --target claude   # or opencode / copilot / generic</code></pre>
        </div>

        <div>
          <h3 class="text-base sm:text-lg font-semibold mb-4">Configure Your LLM</h3>
          <p class="text-midnight-violet-950/60 mb-4">
            Unlost requires an LLM for capsule extraction and summarization. 
          </p>
          <pre><code>unlost config llm anthropic --model claude-sonnet-4-5-20250929
unlost config llm openai --model gpt-4o-mini</code></pre>
          <small class="text-midnight-violet-950/60 block mt-2 text-sm">
            <strong>Recommendation:</strong> Use a fast, cheap model like GPT-4o-mini or Claude 3.5 Haiku. 
          </small>
        </div>

        <div class="pl-3 sm:pl-4 border-l-4 border-fiery-terracotta">
          <p class="text-midnight-violet-950/70">
            That's it. Next time you start your agent, unlost will automatically work alongside it.
            <span class="text-midnight-violet-950/50">Happy coding!</span>
          </p>
        </div>
      </div>
    </div>
  </section>

  <!-- Commands -->
  <section id="commands" class="section">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-8 sm:mb-12 flex items-baseline flex-wrap gap-2">
        Commands 
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>

      <div class="space-y-10 sm:space-y-12">
        <!-- Brief -->
        <div id="brief">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost brief</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">A staff engineer's debrief on any codebase: what matters, what bites, where to start. Scans all recorded memory (conversations + git commits) and scores by importance, not recency.</p>
          <pre><code>unlost brief
unlost brief src/governor.rs
unlost brief TrajectoryController</code></pre>
        </div>

        <!-- Recall -->
        <div id="recall">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost recall</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Recall the story so far (proactive overview) from a specific file or directory.</p>
          <pre><code>unlost recall src/http_proxy.rs
unlost recall src/</code></pre>
        </div>

        <!-- Trace -->
        <div id="trace">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost trace</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Reconstruct the causal chain of decisions that led to the current state of a file, symbol, or concept. Every result includes a <code>Source:</code> footer pointing back to the original conversation, commit, or changelog entry.</p>
          <pre><code>unlost trace src/governor.rs
unlost trace "why is the timeout 30s?"</code></pre>
        </div>

        <div id="challenge">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost challenge</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Pressure-test a past decision or technology choice using workspace memory and the live code graph.</p>
          <pre><code>unlost challenge "lancedb"</code></pre>
        </div>

        <div id="explore">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost explore</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Explore future paths grounded in your workspace memory.</p>
          <pre><code>unlost explore "should we keep lancedb or move to sqlite+fts?"</code></pre>
        </div>

        <div id="thread">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost thread</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Map when a topic was explored over time, across all registered projects. Results open with an LLM synthesis of the journey — what the topic meant, why it recurred, and what older notes change about the current reading — followed by a day-grouped, recent-first timeline with arc duration in the header and backward-in-time gap markers. Cross-workspace by default; falls back to extracted notes and a dim configuration hint if no LLM is configured.</p>
          <pre><code>unlost thread "embedding model performance"
unlost thread "retry logic" --since 6m
unlost thread "auth strategy" --no-llm --limit 20
unlost thread "timeout" --output plain</code></pre>
        </div>

        <!-- Reflect -->
        <div id="reflect">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost reflect</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Reflect on how you and the agent worked together. Reads per-turn evaluation telemetry (collected silently during sessions) and generates a structured narrative via LLM — no raw transcript required. Three modes:</p>
          <ul class="list-disc pl-4 sm:pl-5 space-y-2 text-midnight-violet-950/60 mb-4 text-sm">
            <li><strong>coach</strong> — developer collaboration habits: clarity, scope discipline, verification rigor, session health.</li>
            <li><strong>tune</strong> — agent drift and failure patterns: repetition, hallucination, alignment debt, instruction drift. Audits installed skills and suggests behavioural gaps to fill.</li>
            <li><strong>both</strong> — combined developer and agent report.</li>
          </ul>
          <p class="text-midnight-violet-950/60 mb-4 text-sm">Every output opens with a <strong>NEXT ACTIONS</strong> block — 3–5 scannable imperatives — before the full analysis. The <strong>SKILL ASSESSMENT</strong> section (tune/both) audits your installed agent skills against observed turn data and suggests behavioural gaps to address.</p>
          <pre><code>unlost reflect
unlost reflect --mode tune
unlost reflect --mode both --since 7d
unlost reflect --mode coach --session ses_3a79</code></pre>
        </div>

        <!-- Monitor -->
        <div id="metrics">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost metrics</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#00a483]/10 text-[#00a483] w-fit">Monitor</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Show workspace trajectory metrics and friction hotspots.</p>
          <pre><code>unlost metrics</code></pre>
        </div>

        <div id="replay">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost replay</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#00a483]/10 text-[#00a483] w-fit">Monitor</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Replay and backfill agent transcripts.</p>
          <pre><code>unlost replay opencode --git-grounding --no-llm</code></pre>
        </div>

        <div id="inspect">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost inspect</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#00a483]/10 text-[#00a483] w-fit">Monitor</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Inspect stored capsules for this workspace.</p>
          <pre><code>unlost inspect</code></pre>
        </div>

        <!-- Manage -->
        <div id="reindex">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost reindex</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#9856ca]/10 text-[#9856ca] w-fit">Manage</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Rebuild LanceDB index from capsules.jsonl.</p>
          <pre><code>unlost reindex</code></pre>
        </div>

        <div id="clear">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost clear</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#9856ca]/10 text-[#9856ca] w-fit">Manage</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Delete all generated data for the current workspace.</p>
          <pre><code>unlost clear</code></pre>
        </div>

        <div id="where">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost where</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#9856ca]/10 text-[#9856ca] w-fit">Manage</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Show where the workspace's files are stored.</p>
          <pre><code>unlost where</code></pre>
        </div>

        <div id="config">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost config</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#9856ca]/10 text-[#9856ca] w-fit">Manage</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Manage configuration (LLM provider, agent integrations, etc.).</p>
          <pre><code>unlost config</code></pre>
        </div>

        <div id="note">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost note</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#bd51ea]/10 text-[#bd51ea] w-fit">Memory</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Capture a manual note into workspace memory — a thought, a meeting decision, a constraint discovered outside the agent session. Fully queryable alongside recorded sessions. If no project is detected in the current directory, the note lands in a global workspace; <code>--global</code> forces this regardless. Each note gets a <code class="text-xs">note+local://</code> source pointer, so it shows up with a <em>manual note (YYYY-MM-DD)</em> footer in <code>trace</code> and <code>thread</code> results.</p>
          <pre><code>unlost note "decided to keep lancedb — sqlite FTS doesn't support ANN"
echo "meeting notes..." | unlost note --stdin --source meeting
unlost note "cross-cutting constraint" --global</code></pre>
        </div>

        <div id="mcp">
          <div class="flex flex-col sm:flex-row sm:justify-between sm:items-baseline mb-3 gap-2">
            <h3 class="text-base sm:text-lg font-semibold text-fiery-terracotta">unlost mcp serve</h3>
            <span class="px-3 py-1 text-xs font-medium rounded-full bg-[#00a483]/10 text-[#00a483] w-fit">Agent API</span>
          </div>
          <p class="text-midnight-violet-950/60 mb-4">Start an MCP (Model Context Protocol) stdio server giving agents structured, direct access to workspace memory — no LLM narration, no ANSI prose. Seven tools: <code>unlost_recall</code>, <code>unlost_trace_decision</code>, <code>unlost_challenge</code>, <code>unlost_thread</code>, <code>unlost_orient</code>, <code>unlost_capsule_get</code>, and <code>unlost_note</code>. All read tools run on the no-LLM fast path. Write tools opt-in.</p>
          <pre><code>unlost mcp serve
unlost mcp serve --allow-writes</code></pre>
          <small class="text-midnight-violet-950/60 block mt-2 text-sm">Wire automatically with <code>unlost config agent mcp --target &lt;claude|opencode|copilot|generic&gt;</code>.</small>
        </div>
      </div>
    </div>
  </section>

  <!-- Cognitive Mirror (Metrics & Models) -->
  <section id="cognitive-mirror" class="section border-t border-midnight-violet-950/5">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-8 sm:mb-12 flex items-baseline flex-wrap gap-2">
        The Cognitive Mirror 
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>

      <p class="text-lg sm:text-xl text-midnight-violet-950/60 mb-12 leading-relaxed">
        The <code>unlost metrics</code> command generates a <strong>Cognitive Mirror</strong>: a diagnostic 
        report that reveals the structural health of your collaboration with AI agents.
        For a deeper, session-level narrative, see <a href="#reflect" class="text-fiery-terracotta hover:underline"><code>unlost reflect</code></a>.
      </p>

      <div class="space-y-16">
        <!-- Emotions -->
        <div>
          <h3 class="text-lg sm:text-xl font-semibold text-fiery-terracotta mb-4">Emotional Dynamics</h3>
          <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
            We analyze conversation patterns to detect emotional signals that indicate when interactions may be deteriorating:
          </p>
          <ul class="list-disc pl-4 sm:pl-5 space-y-2 text-midnight-violet-950/60 mb-4">
            <li><strong>Valence:</strong> Positive vs negative sentiment (-1.0 to +1.0)</li>
            <li><strong>Intensity:</strong> Strength of the emotional response (0.0 to 1.0)</li>
          </ul>
          <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
            The purpose is early detection of friction before it escalates. When emotion signals cross thresholds, Unlost can intervene with guidance.
          </p>
        </div>

        <!-- The Three Basins of Friction -->
        <div>
          <h3 class="text-lg sm:text-xl font-semibold text-fiery-terracotta mb-4">The Three Basins of Friction</h3>
          <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
            Unlost models interaction dynamics across three distinct "Basins of Friction" to provide proactive regulation:
          </p>
          <div class="space-y-6 text-midnight-violet-950/60 mb-6">
            <div>
              <h4 class="font-semibold text-midnight-violet-950 mb-1">Loop Basin (The Stall)</h4>
              <p>Detects repetitive failures, symbol stalls, and logic churn. Triggered by high EMA-smoothed repetition and low novelty.</p>
            </div>
            <div>
              <h4 class="font-semibold text-midnight-violet-950 mb-1">Spec Basin (Misunderstanding)</h4>
              <p>Detects alignment debt (user corrections) and instruction staticness (verbatim repeats).</p>
            </div>
            <div>
              <h4 class="font-semibold text-midnight-violet-950 mb-1">Drift Basin (Grounding Failure)</h4>
              <p>Detects grounding stalls (ignoring user file mentions) and symbol hallucinations. Validated against a live codebase graph via <a href="https://github.com/unfault/core" class="text-fiery-terracotta hover:underline font-mono text-sm">unfault-core</a>.</p>
            </div>
          </div>
        </div>

        <!-- At a Glance -->
        <div>
          <h3 class="text-lg sm:text-xl font-semibold text-fiery-terracotta mb-6 uppercase tracking-wider text-sm">Metrics at a Glance</h3>
          <div class="grid grid-cols-1 gap-8">
            <div>
              <div class="font-mono text-xs text-fiery-terracotta mb-2">friction rate</div>
              <p class="text-midnight-violet-950/60 leading-relaxed">
                Measured in <strong>warnings per 1M tokens</strong>. This is your primary "Babysitting Tax" indicator. 
                A rate under 5 is healthy exploration; over 10 indicates a session that is likely 
                stalling or drifting.
              </p>
            </div>
            <div>
              <div class="font-mono text-xs text-fiery-terracotta mb-2">avg interval</div>
              <p class="text-midnight-violet-950/60 leading-relaxed">
                The average number of tokens processed between proactive interventions. Short intervals 
                suggest you are fighting the agent's mental model turn-by-turn.
              </p>
            </div>
          </div>
        </div>

        <!-- Context Inflection -->
        <div>
          <h3 class="text-lg sm:text-xl font-semibold text-fiery-terracotta mb-6 uppercase tracking-wider text-sm">Friction vs Context Size</h3>
          <p class="text-midnight-violet-950/60 leading-relaxed mb-6">
            Unlost buckets friction by input token count to identify your agent's <strong>Context Inflection Point</strong>.
          </p>
          <div class="bg-midnight-violet-950/5 p-6 rounded-2xl border border-midnight-violet-950/5">
            <p class="text-sm italic text-midnight-violet-950/70 mb-4 leading-relaxed">
              "For most current models, we observe a stability collapse between 8k and 12k tokens. 
              The friction rate typically doubles past this point as the 'lost in the middle' phenomenon 
              degrades grounding."
            </p>
            <div class="text-[10px] font-mono uppercase tracking-widest text-midnight-violet-950/30 text-center">Typical Inflection Pattern</div>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- Under the Hood -->
  <section class="section border-t border-midnight-violet-950/5">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-4 flex items-baseline flex-wrap gap-2">
        Under the Hood
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>
      <p class="text-lg text-midnight-violet-950/60 mb-10 leading-relaxed">
        Every sensor, retrieval strategy, and storage primitive that makes Unlost work.
      </p>

      <div class="space-y-14">

        <!-- Recording -->
        <div id="silent-observer">
           <h3 class="text-base sm:text-lg font-semibold mb-3">Recording: The Silent Observer</h3>
           <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
             Unlost is designed to be invisible until you need it. The recording architecture prioritizes your flow above all else:
           </p>
           <div class="space-y-5">
             <div class="border-l-2 border-fiery-terracotta/20 pl-4">
               <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Process Isolation</div>
               <p class="text-sm text-midnight-violet-950/60 leading-relaxed">The Unlost daemon runs as a separate sidecar process. Your agent (Claude, OpenCode) talks to it via a lightweight shim that fires-and-forgets. If Unlost crashes or hangs, your agent keeps working.</p>
             </div>
             <div class="border-l-2 border-fiery-terracotta/20 pl-4">
               <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Async Processing</div>
               <p class="text-sm text-midnight-violet-950/60 leading-relaxed">Heavy lifting (LLM extraction, embedding generation, graph analysis) happens asynchronously in the background. The shim returns control to the agent immediately.</p>
             </div>
             <div class="border-l-2 border-fiery-terracotta/20 pl-4">
               <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Content-Addressed Deduplication</div>
               <p class="text-sm text-midnight-violet-950/60 leading-relaxed">Flush jobs are hashed by content. If an agent loops or retries the same output, Unlost silently suppresses the duplicates (within a 45s window) to keep your history clean.</p>
             </div>
           </div>
        </div>

        <!-- Grounding -->
        <div id="code-graph">
           <h3 class="text-base sm:text-lg font-semibold mb-3">Grounding: The Code Graph</h3>
           <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
             Drift happens when an agent hallucinates symbols that don't exist. Unlost prevents this by maintaining a live graph of your codebase.
           </p>
           <div class="space-y-5">
             <div class="border-l-2 border-fiery-terracotta/20 pl-4">
               <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">unfault-core + petgraph</div>
               <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
                 We use <a href="https://github.com/unfault/core" class="text-fiery-terracotta hover:underline">unfault-core</a> to parse your code and build a dependency graph in milliseconds. It handles symbol resolution, identifying which functions call which, and calculating centrality scores.
               </p>
             </div>
             <div class="border-l-2 border-fiery-terracotta/20 pl-4">
               <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Symbol Verification</div>
               <p class="text-sm text-midnight-violet-950/60 leading-relaxed">Every time an agent mentions a file or function, we verify it against the graph. If it exists, we link the capsule to that node. If it doesn't, we flag it as potential drift.</p>
             </div>
             <div class="border-l-2 border-fiery-terracotta/20 pl-4">
               <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Git Provenance</div>
               <p class="text-sm text-midnight-violet-950/60 leading-relaxed">We capture the git HEAD SHA at the start and end of every turn. This allows us to time-travel: we know exactly what the code looked like when a decision was made, even if it has changed since.</p>
             </div>
           </div>
        </div>

        <!-- Storage & Infrastructure (Remainder) -->
        <div>
          <h3 class="text-base sm:text-lg font-semibold mb-3">Storage &amp; Retrieval</h3>
          <div class="space-y-5">
            <div class="border-l-2 border-fiery-terracotta/20 pl-4">
              <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Apache Arrow / LanceDB</div>
              <p class="text-sm text-midnight-violet-950/60 leading-relaxed">Capsules are stored locally as Arrow RecordBatches with three indexes: ANN (vector search), LabelList (tag filtering), and Scalar (time). It's fast, private, and zero-config.</p>
            </div>
            <div class="border-l-2 border-fiery-terracotta/20 pl-4">
              <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">HyPE Embeddings</div>
              <p class="text-sm text-midnight-violet-950/60 leading-relaxed">We use Hypothetical Prompt Embeddings (HyPE). At indexing time, we generate questions the capsule answers. At retrieval time, we frame your query as a question. Matching questions-to-questions is significantly more accurate than matching queries-to-documents.</p>
            </div>
          </div>
        </div>

        <!-- Source Pointers & Recurrence Channel -->
        <div id="source-pointers">
          <h3 class="text-base sm:text-lg font-semibold mb-3">Source Pointers &amp; the Recurrence Channel</h3>
          <p class="text-midnight-violet-950/60 leading-relaxed mb-4">
            Every capsule carries a <strong>source pointer</strong>: a URI back to the system of record where the conversation happened. Unlost never resolves it for content — that's the agent's job. This separation keeps unlost small while giving the agent a direct line back to original context.
          </p>
          <div class="space-y-5">
            <div class="border-l-2 border-fiery-terracotta/20 pl-4">
              <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">The Pointer Registry</div>
              <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
                Every capsule is stamped with a provenance URI from its shim:
                <code class="text-xs">claude+jsonl://</code> (line-precise to transcript),
                <code class="text-xs">opencode+message://</code> (session + message ID),
                <code class="text-xs">copilot+events://</code> (byte-offset into events log),
                <code class="text-xs">git+commit://</code> (pinned to SHA),
                <code class="text-xs">changelog+version://</code> (pinned to version string), or
                <code class="text-xs">note+local://</code> (timestamp-pinned to a manual note, renders as <em>manual note (YYYY-MM-DD)</em> in query footers).
                A <code>resolve_source_label</code> helper renders these as human-readable footers in every query command.
              </p>
            </div>
            <div class="border-l-2 border-fiery-terracotta/20 pl-4">
              <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">The Recurrence Channel</div>
              <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
                Before every LLM call, unlost runs an ANN vector search across dormant capsules. If a past capsule scores above the similarity gate, a SYSTEM NOTE is injected — quietly pointing the agent back. The note includes the capsule's decision, rationale, and the source pointer. The agent mentions it to you if it's relevant, or ignores it if not. No noise, no notifications, no new UI.
              </p>
            </div>
            <div class="border-l-2 border-fiery-terracotta/20 pl-4">
              <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Cross-Workspace Memory</div>
              <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
                The recurrence channel searches across <em>all</em> workspaces, not just the current one. A decision made in project A that proves relevant to project B surfaces naturally — with a label showing where it came from. Your memory isn't siloed by <code class="text-xs">cd</code> boundaries.
              </p>
            </div>
            <div class="border-l-2 border-fiery-terracotta/20 pl-4">
              <div class="font-mono text-sm font-semibold text-midnight-violet-950 mb-1">Point, Don't Fetch</div>
              <p class="text-sm text-midnight-violet-950/60 leading-relaxed">
                Unlost never fetches external content, never manages API credentials, and never builds source-specific connectors. The agent <em>is</em> the connector. When the agent fetched a Linear ticket via MCP or a GitHub PR during the original conversation, the URL lives inside the capsule's text. The source pointer points to the chat session where it was discussed. Six months later, the agent re-fetches using the same tools it used the first time.
              </p>
            </div>
          </div>
        </div>
        
      </div>
    </div>
  </section>

  <!-- Research & Philosophy -->
  <section class="section border-t border-midnight-violet-950/5">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-8 sm:mb-12 flex items-baseline flex-wrap gap-2">
        Research-First Discipline 
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>

      <p class="text-midnight-violet-950/60 leading-relaxed mb-6">
        Unlost isn't just a collection of heuristics. It is built on a research-first discipline 
        where every sensor and basin is validated against real-world "Marathon" datasets.
      </p>

      <div class="grid grid-cols-1 sm:grid-cols-2 gap-8 text-sm">
        <div>
          <h4 class="font-semibold text-midnight-violet-950 mb-2">Precision-First</h4>
          <p class="text-midnight-violet-950/60">We only intervene when the trajectory signal is unambiguous. We favor silence over noise to protect your flow.</p>
        </div>
        <div>
          <h4 class="font-semibold text-midnight-violet-950 mb-2">Temporal Awareness</h4>
          <p class="text-midnight-violet-950/60">The controller respects "Coffee Pauses." It decays state across breaks to avoid misattributing human pauses to agent stalls.</p>
        </div>
        <div>
          <h4 class="font-semibold text-midnight-violet-950 mb-2">Academic Alignment</h4>
          <p class="text-midnight-violet-950/60">Our basins are aligned with <a href="https://dl.acm.org/doi/full/10.1145/3756681.3756951" class="text-fiery-terracotta hover:underline">EASE'25</a> research on emotional strain, and <a href="https://www.nature.com/articles/s41598-024-67829-6" class="text-fiery-terracotta hover:underline">Nature Scientific Reports</a> on how conversational fluency can mask inaccuracy.</p>
        </div>
        <div>
          <h4 class="font-semibold text-midnight-violet-950 mb-2">Codebase Grounding</h4>
          <p class="text-midnight-violet-950/60">We use <a href="https://github.com/unfault/core" class="text-fiery-terracotta hover:underline font-mono text-sm">unfault-core</a> for sub-second symbol graph validation, ensuring drift detection is backed by factual codebase state.</p>
        </div>
      </div>

      <div class="mt-12 pt-8 border-t border-midnight-violet-950/5">
        <h4 class="text-xs font-semibold text-midnight-violet-950/30 mb-4 uppercase tracking-wider">Scientific References</h4>
        <div class="space-y-4">
          <p class="text-[11px] sm:text-xs text-midnight-violet-950/40 leading-relaxed italic">
            Cristina Martinez Montes and Ranim Khojah. 2025. <b>Emotional Strain and Frustration in LLM Interactions in Software Engineering.</b> 
            In Proceedings of the 29th International Conference on Evaluation and Assessment in Software Engineering (EASE '25). 
            <a href="https://dl.acm.org/doi/full/10.1145/3756681.3756951" class="hover:text-fiery-terracotta underline">DOI: 10.1145/3756681.3756951</a>
          </p>
          <p class="text-[11px] sm:text-xs text-midnight-violet-950/40 leading-relaxed italic">
            Zhu, Y., Wu, Y., & Miller, J. 2024. <b>Conversational presentation mode increases credibility judgements during information search with ChatGPT.</b> 
            Scientific Reports (Nature). 
            <a href="https://www.nature.com/articles/s41598-024-67829-6" class="hover:text-fiery-terracotta underline">DOI: 10.1038/s41598-024-67829-6</a>
          </p>
          <p class="text-[11px] sm:text-xs text-midnight-violet-950/40 leading-relaxed italic">
            Ma, L., et al. 2025. <b>HyPE: Hypothetical Prompt Embeddings for Improved Retrieval.</b>
            arXiv preprint.
            <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5139335" class="hover:text-fiery-terracotta underline" target="_blank" rel="noopener">papers.ssrn.com/sol3/papers.cfm?abstract_id=5139335</a>
            Demonstrates that pre-generating questions at indexing time and matching query-to-question rather than query-to-document significantly improves retrieval precision.
          </p>
        </div>
      </div>
    </div>
  </section>

  <!-- Who's Behind This -->
  <section class="section">
    <div class="container-narrow">
      <h2 class="text-2xl sm:text-3xl font-medium mb-8 sm:mb-12 flex items-baseline flex-wrap gap-2">
        Who's behind this? 
        <span class="inline-block w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-fiery-terracotta mt-1"></span>
      </h2>

      <p class="text-midnight-violet-950/60 leading-relaxed">
        I built Unlost because the intimacy I had with code started slipping
        once agents were doing the writing. I still wanted to feel close to
        what was being built - to understand the tradeoffs, to own the
        decisions, not just approve the diff. Unlost is my attempt to keep
        that feeling alive in a world where I'm not the one typing every line.
      </p>
      <p class="text-midnight-violet-950/60 leading-relaxed mt-4">
        If something feels rough, open an issue. I read them.
        <a href="https://github.com/unfault/unlost/issues" class="text-fiery-terracotta hover:underline">github.com/unfault/unlost/issues</a>
      </p>
      <p class="text-midnight-violet-950/50 mt-6">- Sylvain</p>
    </div>
  </section>


  <!-- Footer -->
  <footer class="py-8 sm:py-12 px-4">
    <div class="max-w-2xl mx-auto flex flex-col sm:flex-row items-center justify-between text-sm text-midnight-violet-950/40 gap-4">
      <span class="text-center sm:text-left">MIT License · © 2026 Sylvain Hellegouarch</span>
      <div class="flex items-center gap-4">
        <a href="https://github.com/unfault/unlost" class="text-midnight-violet-950/60 hover:text-fiery-terracotta transition-colors">GitHub</a>
        <a href="https://unfault.dev" class="text-midnight-violet-950/60 hover:text-fiery-terracotta transition-colors">unfault.dev</a>
      </div>
    </div>
  </footer>
</body>
</html>