-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathmnemon-architecture.drawio
More file actions
1379 lines (1232 loc) · 126 KB
/
mnemon-architecture.drawio
File metadata and controls
1379 lines (1232 loc) · 126 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<mxfile host="app.diagrams.net" modified="2026-02-18T15:30:00.000Z" agent="Claude" version="24.0.0" type="device">
<!-- ================================================================ -->
<!-- Page 1: System Architecture -->
<!-- ================================================================ -->
<diagram id="arch" name="System Architecture">
<mxGraphModel dx="1422" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1400" pageHeight="900" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Title -->
<mxCell id="a_title" value="<b>Mnemon System Architecture</b>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=18;" vertex="1" parent="1">
<mxGeometry x="500" y="10" width="300" height="40" as="geometry"/>
</mxCell>
<!-- ========== Layer 1: Integration (Purple) ========== -->
<mxCell id="a_l1" value="<b>Integration Layer</b> (LLM ↔ CLI)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;" vertex="1" parent="1">
<mxGeometry x="40" y="60" width="1120" height="110" as="geometry"/>
</mxCell>
<mxCell id="a_claude" value="<b>Claude Code</b><br>LLM Agent" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="90" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="a_hooks" value="<b>Hooks</b><br>Prime / Remind<br>Nudge / Compact" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="220" y="90" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="a_claudemd" value="<b>Guide</b><br>~/.mnemon/prompt/<br>recall/remember rules" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="390" y="90" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="a_skill" value="<b>Skill</b><br>SKILL.md<br>command reference" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="560" y="90" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="a_inject" value="<b>mnemon setup</b><br>auto deploy / eject" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="730" y="90" width="150" height="60" as="geometry"/>
</mxCell>
<!-- ========== Layer 2: CLI Commands (Blue) ========== -->
<mxCell id="a_l2" value="<b>CLI Layer</b> cmd/ (cobra commands)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;" vertex="1" parent="1">
<mxGeometry x="40" y="200" width="1120" height="110" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_rem" value="<b>remember</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="60" y="235" width="90" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_rec" value="<b>recall</b><br>(smart default)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="165" y="235" width="90" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_sea" value="<b>search</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="270" y="235" width="75" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_dif" value="<b>diff</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="360" y="235" width="75" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_lnk" value="<b>link</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="450" y="235" width="75" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_gc" value="<b>gc</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="540" y="235" width="75" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_for" value="<b>forget</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="630" y="235" width="75" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_rel" value="<b>related</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="720" y="235" width="75" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_emb" value="<b>embed</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="810" y="235" width="75" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_sta" value="<b>status</b> / <b>log</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="900" y="235" width="100" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_setup" value="<b>setup</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="1015" y="235" width="60" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_cmd_viz" value="<b>viz</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="1085" y="235" width="55" height="55" as="geometry"/>
</mxCell>
<!-- ========== Layer 3: Core Engine (Green) ========== -->
<mxCell id="a_l3" value="<b>Core Engine Layer</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;" vertex="1" parent="1">
<mxGeometry x="40" y="340" width="1120" height="180" as="geometry"/>
</mxCell>
<!-- search/ module -->
<mxCell id="a_search" value="<b>search/</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="60" y="370" width="310" height="130" as="geometry"/>
</mxCell>
<mxCell id="a_recall" value="<b>recall.go</b><br>IntentAwareRecall<br>beamSearch<br>vectorSearch<br>causalTopoSort" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#666666;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="70" y="395" width="140" height="90" as="geometry"/>
</mxCell>
<mxCell id="a_kw" value="<b>keyword.go</b><br>KeywordSearch<br>ContentSimilarity<br>Tokenize (stopwords)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#666666;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="220" y="395" width="140" height="70" as="geometry"/>
</mxCell>
<mxCell id="a_intent" value="<b>intent.go</b><br>DetectIntent<br>WHY|WHEN|ENTITY|GENERAL" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#666666;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="220" y="470" width="140" height="25" as="geometry"/>
</mxCell>
<!-- graph/ module -->
<mxCell id="a_graph" value="<b>graph/</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="390" y="370" width="460" height="130" as="geometry"/>
</mxCell>
<mxCell id="a_engine" value="<b>engine.go</b><br>OnInsightCreated<br>(orchestrator)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="400" y="395" width="100" height="55" as="geometry"/>
</mxCell>
<mxCell id="a_temp" value="<b>temporal.go</b><br>backbone +<br>proximity(24h)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#E6F3FF;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="510" y="395" width="100" height="50" as="geometry"/>
</mxCell>
<mxCell id="a_ent" value="<b>entity.go</b><br>regex + dict<br>co-occurrence" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#E6F3FF;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="620" y="395" width="100" height="50" as="geometry"/>
</mxCell>
<mxCell id="a_sem" value="<b>semantic.go</b><br>auto: cos≥0.80<br>review: 0.40-0.80" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#E6FFE6;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="510" y="455" width="100" height="50" as="geometry"/>
</mxCell>
<mxCell id="a_cau" value="<b>causal.go</b><br>keyword signal<br>BFS candidates" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#FFE6E6;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="620" y="455" width="100" height="50" as="geometry"/>
</mxCell>
<mxCell id="a_lbl_auto" value="auto" style="text;html=1;fontSize=8;fillColor=none;strokeColor=none;fontColor=#82b366;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="735" y="395" width="30" height="15" as="geometry"/>
</mxCell>
<mxCell id="a_lbl_llm" value="LLM
review" style="text;html=1;fontSize=8;fillColor=none;strokeColor=none;fontColor=#b85450;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="735" y="460" width="40" height="25" as="geometry"/>
</mxCell>
<!-- embed/ module -->
<mxCell id="a_embed" value="<b>embed/</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="870" y="370" width="270" height="130" as="geometry"/>
</mxCell>
<mxCell id="a_ollama_c" value="<b>ollama.go</b><br>HTTP client<br>nomic-embed-text<br>graceful fallback" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#666666;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="880" y="395" width="120" height="70" as="geometry"/>
</mxCell>
<mxCell id="a_vec" value="<b>vector.go</b><br>CosineSimilarity<br>Serialize/Deserialize" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#666666;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="1010" y="395" width="120" height="55" as="geometry"/>
</mxCell>
<!-- ========== Layer 4: Storage (Orange) ========== -->
<mxCell id="a_l4" value="<b>Storage Layer</b> store/" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;" vertex="1" parent="1">
<mxGeometry x="40" y="550" width="1120" height="120" as="geometry"/>
</mxCell>
<mxCell id="a_db" value="<b>db.go</b><br>SQLite via modernc.org<br>InTransaction()<br>schema migration" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#fce5cd;strokeColor=#d6b656;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="60" y="580" width="170" height="70" as="geometry"/>
</mxCell>
<mxCell id="a_node" value="<b>node.go</b><br>InsertInsight / GetAllActive<br>GetAllEmbeddings / ScanEmbed<br>AutoPrune / RefreshEI<br>BoostRetention / GC" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#fce5cd;strokeColor=#d6b656;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="250" y="580" width="200" height="75" as="geometry"/>
</mxCell>
<mxCell id="a_edge" value="<b>edge.go</b><br>InsertEdge<br>GetEdgesFrom<br>GetRecentInWindow" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#fce5cd;strokeColor=#d6b656;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="470" y="580" width="150" height="65" as="geometry"/>
</mxCell>
<mxCell id="a_tables" value="<b>SQLite Tables</b><br>insights (id, content, category,<br> importance, entities, embedding,<br> access_count, effective_importance)<br>edges (source_id, target_id, type, weight)<br>oplog (timestamp, op, detail)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#999999;align=left;spacingLeft=5;dashed=1;" vertex="1" parent="1">
<mxGeometry x="700" y="575" width="280" height="85" as="geometry"/>
</mxCell>
<mxCell id="a_cap" value="<b>MaxInsights = 1000</b><br>~7MB memory / ~1.4MB disk" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="1000" y="580" width="150" height="40" as="geometry"/>
</mxCell>
<!-- ========== Layer 5: External (Gray) ========== -->
<mxCell id="a_l5" value="<b>External Services</b> (optional)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="40" y="700" width="1120" height="80" as="geometry"/>
</mxCell>
<mxCell id="a_ollama_s" value="<b>Ollama</b><br>localhost:11434 | nomic-embed-text (768d)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="60" y="725" width="300" height="40" as="geometry"/>
</mxCell>
<mxCell id="a_fs" value="<b>File System</b><br>~/.mnemon/mnemon.db (single file)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="400" y="725" width="280" height="40" as="geometry"/>
</mxCell>
<!-- ========== Arrows between layers ========== -->
<mxCell id="a_e1" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#999999;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="a_claude" target="a_cmd_rem">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="a_e2" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#999999;" edge="1" parent="1" source="a_hooks" target="a_cmd_rec">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<!-- ================================================================ -->
<!-- Page 2: Remember Pipeline -->
<!-- ================================================================ -->
<diagram id="remember" name="Remember Pipeline">
<mxGraphModel dx="1422" dy="1400" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1000" pageHeight="1700" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Title -->
<mxCell id="r_title" value="<b>mnemon remember Pipeline</b>" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="300" y="10" width="300" height="30" as="geometry"/>
</mxCell>
<!-- Start -->
<mxCell id="r_start" value="mnemon remember &lt;content&gt;<br>--cat --imp --tags --entities --source" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="280" y="50" width="340" height="50" as="geometry"/>
</mxCell>
<!-- Parse & Validate -->
<mxCell id="r_parse" value="Parse & Validate Args<br><font style="font-size:9px">category ∈ {preference,decision,fact,insight,context,general}<br>importance ∈ [1,5] | content ≤ 8000 chars</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="130" width="340" height="60" as="geometry"/>
</mxCell>
<mxCell id="r_e1" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_start" target="r_parse">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Embed -->
<mxCell id="r_embed_q" value="Ollama<br>available?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="380" y="220" width="120" height="70" as="geometry"/>
</mxCell>
<mxCell id="r_e2" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_parse" target="r_embed_q">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r_embed_yes" value="HTTP POST → Ollama<br>nomic-embed-text<br>→ 768d float64 vector<br>→ SerializeVector()" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=9;" vertex="1" parent="1">
<mxGeometry x="560" y="225" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="r_e_yes" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="r_embed_q" target="r_embed_yes">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r_embed_no" value="embeddingBlob = nil<br>(fallback to token overlap)" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=9;" vertex="1" parent="1">
<mxGeometry x="170" y="230" width="170" height="50" as="geometry"/>
</mxCell>
<mxCell id="r_e_no" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="r_embed_q" target="r_embed_no">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Built-in Diff (before transaction) -->
<mxCell id="r_diff_box" value="<b>Built-in Diff</b> (pre-transaction, read-only)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="200" y="310" width="500" height="110" as="geometry"/>
</mxCell>
<mxCell id="r_diff_check" value="<b>Dedup Check</b><br><font style="font-size:9px">Compute similarity vs all active insights<br>(embedding cosine or token overlap)</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="220" y="340" width="200" height="55" as="geometry"/>
</mxCell>
<mxCell id="r_diff_result" value="<b>Decision</b><br><font style="font-size:9px">DUPLICATE (>0.90) → skip, return early<br>CONFLICT (0.50-0.90) → replace old<br>ADD (<0.50) → continue to insert</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="450" y="335" width="230" height="65" as="geometry"/>
</mxCell>
<mxCell id="r_diff_e" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_diff_check" target="r_diff_result">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Transaction box -->
<mxCell id="r_tx" value="<b>SQLite Transaction</b> (atomic)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="150" y="450" width="600" height="420" as="geometry"/>
</mxCell>
<!-- Step 0: Soft-delete if replacing -->
<mxCell id="r_softdel" value="⓪ Soft-delete replaced insight (if CONFLICT/UPDATE)<br><font style="font-size:9px">SET deleted_at = now() on old insight</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="475" width="340" height="40" as="geometry"/>
</mxCell>
<!-- Step 1: Insert -->
<mxCell id="r_ins" value="① InsertInsight<br><font style="font-size:9px">id=uuid, content, category, importance, tags, entities, source</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="530" width="340" height="45" as="geometry"/>
</mxCell>
<mxCell id="r_e_softdel" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_softdel" target="r_ins">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Step 2: Store embedding -->
<mxCell id="r_store_emb" value="② UpdateEmbedding (if blob ≠ nil)<br><font style="font-size:9px">insights.embedding = blob (6144 bytes)</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="590" width="340" height="40" as="geometry"/>
</mxCell>
<mxCell id="r_e3" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_ins" target="r_store_emb">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Step 3: Graph Engine -->
<mxCell id="r_engine" value="③ Graph Engine: OnInsightCreated" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="280" y="650" width="340" height="30" as="geometry"/>
</mxCell>
<mxCell id="r_e4" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_store_emb" target="r_engine">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- 4 edge types -->
<mxCell id="r_temp" value="<b>Temporal</b><br><font style="font-size:8px">backbone (prev)<br>proximity (24h window)<br>max 10 edges<br>w=1/(1+hours_diff)</font>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#E6F3FF;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="170" y="700" width="130" height="75" as="geometry"/>
</mxCell>
<mxCell id="r_ent" value="<b>Entity</b><br><font style="font-size:8px">regex + 200-word dict<br>merge with --entities<br>bidirectional edges<br>on shared entities</font>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#E6F3FF;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="310" y="700" width="130" height="75" as="geometry"/>
</mxCell>
<mxCell id="r_caus" value="<b>Causal</b><br><font style="font-size:8px">keyword regex<br>(because/decided/due to)<br>auto edge if signal<br>found in content</font>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#FFE6E6;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="450" y="700" width="130" height="75" as="geometry"/>
</mxCell>
<mxCell id="r_sema" value="<b>Semantic</b><br><font style="font-size:8px">cosine similarity<br>AUTO: ≥ 0.80 (max 3)<br>bidirectional edges<br>needs embedding</font>" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#E6FFE6;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="590" y="700" width="130" height="75" as="geometry"/>
</mxCell>
<mxCell id="r_e5a" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#6c8ebf;" edge="1" parent="1" source="r_engine" target="r_temp">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r_e5b" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#6c8ebf;" edge="1" parent="1" source="r_engine" target="r_ent">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r_e5c" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#b85450;" edge="1" parent="1" source="r_engine" target="r_caus">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r_e5d" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#82b366;" edge="1" parent="1" source="r_engine" target="r_sema">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Step 4: EI + Prune -->
<mxCell id="r_ei" value="④ RefreshEffectiveImportance<br><font style="font-size:9px">EI = base_importance × decay × (1 + edge_bonus)</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="800" width="340" height="40" as="geometry"/>
</mxCell>
<mxCell id="r_prune" value="⑤ AutoPrune (if total > 1000)<br><font style="font-size:9px">soft-delete lowest EI, skip immune (imp≥4 or access≥3)</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="855" width="340" height="40" as="geometry"/>
</mxCell>
<mxCell id="r_e6" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_ei" target="r_prune">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Post-transaction: candidates -->
<mxCell id="r_post" value="<b>Post-Transaction (read-only)</b>" style="text;html=1;align=left;fontSize=11;fillColor=none;strokeColor=none;fontStyle=1;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="170" y="950" width="250" height="20" as="geometry"/>
</mxCell>
<mxCell id="r_sem_cand" value="FindSemanticCandidates<br><font style="font-size:9px">cosine ∈ [0.40, 0.80) → REVIEW (LLM judges)<br>cosine ≥ 0.80 → AUTO (already linked)</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="170" y="980" width="260" height="55" as="geometry"/>
</mxCell>
<mxCell id="r_cau_cand" value="FindCausalCandidates<br><font style="font-size:9px">BFS 2-hop neighborhood<br>causal_signal + suggested_sub_type</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFE6E6;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="470" y="980" width="260" height="55" as="geometry"/>
</mxCell>
<!-- Output -->
<mxCell id="r_out" value="<b>JSON Output</b><br><font style="font-size:9px">{id, action, diff_suggestion, replaced_id,<br>edges_created: {temporal, entity, causal, semantic},<br>semantic_candidates: [{id, content, auto_linked, ...}],<br>causal_candidates: [{id, content, hop, via_edge, ...}],<br>embedded, effective_importance, auto_pruned}</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="220" y="1070" width="450" height="90" as="geometry"/>
</mxCell>
<mxCell id="r_e7a" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_sem_cand" target="r_out">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="r_e7b" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="r_cau_cand" target="r_out">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- LLM feedback loop -->
<mxCell id="r_llm" value="<b>LLM evaluates candidates</b><br><font style="font-size:9px">decides which to link via:<br>mnemon link &lt;src&gt; &lt;tgt&gt; --type semantic|causal</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="280" y="1190" width="340" height="55" as="geometry"/>
</mxCell>
<mxCell id="r_e8" style="edgeStyle=orthogonalEdgeStyle;rounded=1;dashed=1;strokeColor=#82b366;" edge="1" parent="1" source="r_out" target="r_llm">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<!-- ================================================================ -->
<!-- Page 3: Smart Recall Pipeline -->
<!-- ================================================================ -->
<diagram id="recall" name="Recall Pipeline (Default)">
<mxGraphModel dx="1422" dy="1400" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="1600" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Title -->
<mxCell id="s_title" value="<b>mnemon recall Pipeline (Default)</b>" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="300" y="10" width="350" height="30" as="geometry"/>
</mxCell>
<!-- Start -->
<mxCell id="s_start" value="mnemon recall &lt;query&gt;<br>[--intent WHY|WHEN|ENTITY|GENERAL] [--limit N] [--basic]" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="250" y="50" width="400" height="45" as="geometry"/>
</mxCell>
<!-- Embed query -->
<mxCell id="s_emb" value="Embed query → 768d vector<br><font style="font-size:9px">(Ollama nomic-embed-text, nil if unavailable)</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="300" y="120" width="300" height="40" as="geometry"/>
</mxCell>
<mxCell id="s_e1" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_start" target="s_emb">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Intent Detection -->
<mxCell id="s_intent" value="Intent Detection<br><font style="font-size:9px">regex: why/because→WHY | when/time→WHEN | what is→ENTITY | else→GENERAL</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="250" y="185" width="400" height="45" as="geometry"/>
</mxCell>
<mxCell id="s_e2" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_emb" target="s_intent">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Adaptive params -->
<mxCell id="s_params" value="Adaptive Traversal Params" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="700" y="185" width="180" height="30" as="geometry"/>
</mxCell>
<mxCell id="s_ptable" value="<table style="font-size:9px;"><tr><th>Intent</th><th>Beam</th><th>Depth</th><th>Budget</th></tr><tr><td>WHY</td><td>15</td><td>5</td><td>500</td></tr><tr><td>WHEN</td><td>10</td><td>5</td><td>400</td></tr><tr><td>ENTITY</td><td>10</td><td>4</td><td>400</td></tr><tr><td>GENERAL</td><td>10</td><td>4</td><td>500</td></tr></table>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;overflow=fill;" vertex="1" parent="1">
<mxGeometry x="700" y="220" width="180" height="90" as="geometry"/>
</mxCell>
<mxCell id="s_ep" style="edgeStyle=orthogonalEdgeStyle;rounded=1;dashed=1;strokeColor=#999999;" edge="1" parent="1" source="s_intent" target="s_params">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- GetAllActiveInsights -->
<mxCell id="s_getall" value="GetAllActiveInsights()<br><font style="font-size:9px">O(n) full table scan — current bottleneck</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="300" y="260" width="300" height="40" as="geometry"/>
</mxCell>
<mxCell id="s_e3" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_intent" target="s_getall">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Multi-signal anchor box -->
<mxCell id="s_anchor_box" value="<b>Multi-Signal Anchor Selection</b> (top-20 per signal)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="80" y="330" width="750" height="130" as="geometry"/>
</mxCell>
<mxCell id="s_sig1" value="<b>Signal 1: Keyword</b><br><font style="font-size:9px">KeywordSearch(all, query, 20)<br>tokenized matching</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="100" y="365" width="170" height="65" as="geometry"/>
</mxCell>
<mxCell id="s_sig2" value="<b>Signal 2: Vector</b><br><font style="font-size:9px">ScanEmbeddings → cosine<br>streaming O(n) brute force</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="290" y="365" width="170" height="65" as="geometry"/>
</mxCell>
<mxCell id="s_sig3" value="<b>Signal 3: Recency</b><br><font style="font-size:9px">sort by created_at DESC<br>top-20 most recent</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="480" y="365" width="160" height="65" as="geometry"/>
</mxCell>
<mxCell id="s_sig4" value="<b>Signal 4: Entity</b><br><font style="font-size:9px">shared entities<br>with query</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="660" y="365" width="140" height="65" as="geometry"/>
</mxCell>
<!-- RRF Fusion -->
<mxCell id="s_rrf" value="<b>RRF Fusion</b> (k=60)<br><font style="font-size:9px">score = Σ 1/(k + rank_i + 1) for each signal<br>merge into anchorMap, tag via: keyword|vector|hybrid|temporal|entity</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="250" y="490" width="400" height="55" as="geometry"/>
</mxCell>
<mxCell id="s_e4" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_anchor_box" target="s_rrf">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Sort & select top anchors -->
<mxCell id="s_topk" value="Sort anchors by RRF score → select top-K" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="300" y="575" width="300" height="30" as="geometry"/>
</mxCell>
<mxCell id="s_e5" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_rrf" target="s_topk">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Beam Search box -->
<mxCell id="s_beam_box" value="<b>Beam Search</b> (per anchor, MAGMA §4.2)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=11;align=left;spacingLeft=10;dashed=1;" vertex="1" parent="1">
<mxGeometry x="130" y="630" width="640" height="200" as="geometry"/>
</mxCell>
<mxCell id="s_pq" value="<b>Priority Queue</b><br><font style="font-size:9px">container/heap<br>seed: anchor node</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="150" y="665" width="130" height="55" as="geometry"/>
</mxCell>
<mxCell id="s_expand" value="<b>Expand Node</b><br><font style="font-size:9px">GetEdgesFrom(nodeID)<br>for each neighbor:<br>score = score_u + λ₁·structural + λ₂·semantic<br>(λ₁=1.0, λ₂=0.4)</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;align=left;spacingLeft=5;" vertex="1" parent="1">
<mxGeometry x="300" y="660" width="260" height="70" as="geometry"/>
</mxCell>
<mxCell id="s_budget" value="<b>Budget Check</b><br><font style="font-size:9px">visited < MaxVisited?<br>depth < MaxDepth?<br>beam < BeamWidth?</font>" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=9;" vertex="1" parent="1">
<mxGeometry x="580" y="660" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="s_collect" value="Collect traversed nodes<br><font style="font-size:9px">with scores, depth, via_edge_type</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="250" y="770" width="250" height="40" as="geometry"/>
</mxCell>
<mxCell id="s_eb1" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_pq" target="s_expand">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="s_eb2" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_expand" target="s_budget">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="s_eb3" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="s_budget" target="s_pq">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="660" y="750"/>
<mxPoint x="150" y="750"/>
<mxPoint x="150" y="692"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="s_e6" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_topk" target="s_beam_box">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Post-processing -->
<mxCell id="s_dedup" value="Deduplicate & Merge results across anchors" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="275" y="860" width="350" height="30" as="geometry"/>
</mxCell>
<!-- Intent weights -->
<mxCell id="s_weights" value="Apply Intent Weights<br><font style="font-size:9px">final_score = w_keyword·kw + w_entity·ent + w_similarity·sim + w_graph·graph</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="225" y="915" width="450" height="40" as="geometry"/>
</mxCell>
<mxCell id="s_e7" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_dedup" target="s_weights">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Weight table -->
<mxCell id="s_wtable" value="<table style="font-size:9px;"><tr><th>Intent</th><th>KW</th><th>Entity</th><th>Sim</th><th>Graph</th></tr><tr><td>WHY</td><td>0.10</td><td>0.10</td><td>0.30</td><td>0.50</td></tr><tr><td>WHEN</td><td>0.15</td><td>0.15</td><td>0.30</td><td>0.40</td></tr><tr><td>ENTITY</td><td>0.20</td><td>0.40</td><td>0.20</td><td>0.20</td></tr><tr><td>GENERAL</td><td>0.25</td><td>0.25</td><td>0.25</td><td>0.25</td></tr></table>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;overflow=fill;" vertex="1" parent="1">
<mxGeometry x="700" y="895" width="200" height="90" as="geometry"/>
</mxCell>
<mxCell id="s_ew" style="edgeStyle=orthogonalEdgeStyle;rounded=1;dashed=1;strokeColor=#999999;" edge="1" parent="1" source="s_weights" target="s_wtable">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Topo sort -->
<mxCell id="s_topo_q" value="Intent == WHY?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="375" y="980" width="150" height="60" as="geometry"/>
</mxCell>
<mxCell id="s_e8" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_weights" target="s_topo_q">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="s_topo" value="Causal Topological Sort<br><font style="font-size:9px">Kahn's algorithm on causal edges<br>causes before effects</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFE6E6;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="570" y="985" width="200" height="50" as="geometry"/>
</mxCell>
<mxCell id="s_e_topo" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="s_topo_q" target="s_topo">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="s_skip" value="Sort by score DESC" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="180" y="990" width="150" height="35" as="geometry"/>
</mxCell>
<mxCell id="s_e_skip" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="s_topo_q" target="s_skip">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Output -->
<mxCell id="s_out" value="<b>JSON Output</b><br><font style="font-size:9px">{results: [{insight: {...}, score, intent, via, signals: {keyword, entity, similarity, graph}}],<br> meta: {intent, intent_source, anchor_count, traversed, hint}}</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="200" y="1080" width="500" height="60" as="geometry"/>
</mxCell>
<mxCell id="s_e9a" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_topo" target="s_out">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="s_e9b" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="s_skip" target="s_out">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<!-- ================================================================ -->
<!-- Page 4: MAGMA Four-Graph Model -->
<!-- ================================================================ -->
<diagram id="fourgraph" name="MAGMA Four-Graph Model">
<mxGraphModel dx="1422" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="900" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Title -->
<mxCell id="fg_title" value="<b>MAGMA Four-Graph Model</b><br><font style="font-size:11px">Four edge types capture multi-dimensional relationships between insights</font>" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="300" y="10" width="500" height="45" as="geometry"/>
</mxCell>
<!-- ========== Central Insight Nodes ========== -->
<mxCell id="fg_n1" value="<b>A</b><br><font style="font-size:8px">Chose SQLite<br>for storage</font>" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="200" y="200" width="100" height="80" as="geometry"/>
</mxCell>
<mxCell id="fg_n2" value="<b>B</b><br><font style="font-size:8px">Team lacks<br>Redis experience</font>" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="480" y="120" width="100" height="80" as="geometry"/>
</mxCell>
<mxCell id="fg_n3" value="<b>C</b><br><font style="font-size:8px">SQLite WAL<br>concurrency test</font>" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="480" y="310" width="100" height="80" as="geometry"/>
</mxCell>
<mxCell id="fg_n4" value="<b>D</b><br><font style="font-size:8px">DB selection<br>comparison</font>" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="780" y="200" width="100" height="80" as="geometry"/>
</mxCell>
<mxCell id="fg_n5" value="<b>E</b><br><font style="font-size:8px">Deployment<br>confirmed</font>" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="200" y="400" width="100" height="80" as="geometry"/>
</mxCell>
<!-- ========== Graph 1: Temporal (Blue) ========== -->
<mxCell id="fg_t_label" value="<b>① Temporal Graph</b><br><font style="font-size:9px">time-ordered backbone + 24h proximity<br>backbone + proximity</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="40" y="550" width="200" height="60" as="geometry"/>
</mxCell>
<!-- A → B backbone -->
<mxCell id="fg_t1" value="backbone" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#6c8ebf;strokeWidth=2;fontSize=9;fontColor=#6c8ebf;" edge="1" parent="1" source="fg_n1" target="fg_n2">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- B → C backbone -->
<mxCell id="fg_t2" value="backbone" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#6c8ebf;strokeWidth=2;fontSize=9;fontColor=#6c8ebf;" edge="1" parent="1" source="fg_n2" target="fg_n3">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- A ↔ E proximity -->
<mxCell id="fg_t3" value="proximity w=0.5" style="rounded=1;strokeColor=#6c8ebf;strokeWidth=1;dashed=1;fontSize=8;fontColor=#6c8ebf;" edge="1" parent="1" source="fg_n1" target="fg_n5">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ========== Graph 2: Entity (Teal) ========== -->
<mxCell id="fg_e_label" value="<b>② Entity Graph</b><br><font style="font-size:9px">co-occurrence on shared entities<br>regex + dictionary + user labels</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="550" width="200" height="60" as="geometry"/>
</mxCell>
<!-- A ↔ C entity: SQLite -->
<mxCell id="fg_e1" value="entity: SQLite" style="rounded=1;strokeColor=#82b366;strokeWidth=2;fontSize=9;fontColor=#82b366;" edge="1" parent="1" source="fg_n1" target="fg_n3">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- A ↔ D entity: SQLite -->
<mxCell id="fg_e2" value="entity: SQLite" style="rounded=1;strokeColor=#82b366;strokeWidth=2;fontSize=9;fontColor=#82b366;" edge="1" parent="1" source="fg_n1" target="fg_n4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ========== Graph 3: Causal (Red) ========== -->
<mxCell id="fg_c_label" value="<b>③ Causal Graph</b><br><font style="font-size:9px">causal reasoning chains<br>cause → effect</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6E6;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="520" y="550" width="200" height="60" as="geometry"/>
</mxCell>
<!-- B → A causal: causes -->
<mxCell id="fg_c1" value="causes" style="rounded=1;strokeColor=#b85450;strokeWidth=3;fontSize=9;fontColor=#b85450;fontStyle=1;" edge="1" parent="1" source="fg_n2" target="fg_n1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="400" y="160"/>
<mxPoint x="400" y="240"/>
</Array>
</mxGeometry>
</mxCell>
<!-- ========== Graph 4: Semantic (Purple) ========== -->
<mxCell id="fg_s_label" value="<b>④ Semantic Graph</b><br><font style="font-size:9px">semantic similarity links<br>cos ≥ 0.80 auto | 0.40-0.80 LLM review</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="760" y="550" width="240" height="60" as="geometry"/>
</mxCell>
<!-- C ↔ D semantic -->
<mxCell id="fg_s1" value="semantic cos=0.87 (auto)" style="rounded=1;strokeColor=#9673a6;strokeWidth=2;dashed=0;fontSize=9;fontColor=#9673a6;" edge="1" parent="1" source="fg_n3" target="fg_n4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ========== Intent Routing Box ========== -->
<mxCell id="fg_intent_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#999999;dashed=1;" vertex="1" parent="1">
<mxGeometry x="40" y="640" width="960" height="130" as="geometry"/>
</mxCell>
<mxCell id="fg_intent_title" value="<b>Intent-Adaptive Retrieval</b> — different queries activate different graphs" style="text;html=1;align=left;fontSize=11;fillColor=none;strokeColor=none;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="60" y="650" width="500" height="20" as="geometry"/>
</mxCell>
<mxCell id="fg_why" value="<b>"Why chose SQLite?"</b><br><font style="font-size:9px">WHY intent → <font color="#b85450">Causal 0.70</font><br>causal chain: B→A</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE6E6;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="60" y="680" width="200" height="70" as="geometry"/>
</mxCell>
<mxCell id="fg_when" value="<b>"Recent decisions?"</b><br><font style="font-size:9px">WHEN intent → <font color="#6c8ebf">Temporal 0.65</font><br>timeline: A→B→C</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="290" y="680" width="200" height="70" as="geometry"/>
</mxCell>
<mxCell id="fg_entity" value="<b>"About SQLite?"</b><br><font style="font-size:9px">ENTITY intent → <font color="#82b366">Entity 0.55</font><br>shared entities: A,C,D</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="520" y="680" width="200" height="70" as="geometry"/>
</mxCell>
<mxCell id="fg_general" value="<b>"Database related"</b><br><font style="font-size:9px">GENERAL intent → equal 0.25<br>all four graphs weighted equally</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="750" y="680" width="200" height="70" as="geometry"/>
</mxCell>
<!-- Legend -->
<mxCell id="fg_legend_title" value="<b>Legend</b>" style="text;html=1;align=left;fontSize=10;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="40" y="800" width="60" height="20" as="geometry"/>
</mxCell>
<mxCell id="fg_leg1" value="<font color="#6c8ebf">━━</font> Temporal" style="text;html=1;align=left;fontSize=9;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="40" y="820" width="100" height="15" as="geometry"/>
</mxCell>
<mxCell id="fg_leg2" value="<font color="#82b366">━━</font> Entity" style="text;html=1;align=left;fontSize=9;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="150" y="820" width="100" height="15" as="geometry"/>
</mxCell>
<mxCell id="fg_leg3" value="<font color="#b85450">━━</font> Causal" style="text;html=1;align=left;fontSize=9;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="260" y="820" width="100" height="15" as="geometry"/>
</mxCell>
<mxCell id="fg_leg4" value="<font color="#9673a6">━━</font> Semantic" style="text;html=1;align=left;fontSize=9;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="370" y="820" width="100" height="15" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<!-- ================================================================ -->
<!-- Page 5: LLM-Supervised Architecture -->
<!-- ================================================================ -->
<diagram id="llm-supervised" name="LLM-Supervised Architecture">
<mxGraphModel dx="1422" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="800" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Title -->
<mxCell id="cl_title" value="<b>LLM-Supervised Architecture</b><br><font style="font-size:11px">Binary handles deterministic computation; Host LLM supervises high-value judgment</font>" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="250" y="10" width="600" height="45" as="geometry"/>
</mxCell>
<!-- ========== Left: Binary (Organ) ========== -->
<mxCell id="cl_bin_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=top;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="40" y="80" width="450" height="580" as="geometry"/>
</mxCell>
<mxCell id="cl_bin_title" value="<b>Binary (Organ)</b><br><font style="font-size:10px">Deterministic, high-frequency, zero cost</font>" style="text;html=1;align=center;fontSize=14;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="100" y="90" width="330" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b1" value="<b>Storage</b><br>SQLite WAL, ACID, single file" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="145" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b2" value="<b>Graph Indexing</b><br>temporal backbone, entity co-occurrence, auto-edges" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="200" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b3" value="<b>Keyword Search</b><br>tokenization, stopwords, CJK bigrams, scoring" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="255" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b4" value="<b>Intent Detection</b><br>regex pattern matching → WHY/WHEN/ENTITY/GENERAL" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="310" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b5" value="<b>Beam Search & RRF Fusion</b><br>multi-signal anchoring, graph traversal, reranking" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="365" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b6" value="<b>Vector Computation</b><br>cosine similarity, embedding serialization" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="420" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b7" value="<b>Entity Extraction</b><br>regex + 200-word tech dictionary + CamelCase/ALLCAPS" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="475" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b8" value="<b>Lifecycle Decay</b><br>EI formula, auto-prune, immunity rules, GC" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="530" width="390" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_b9" value="<b>Duplicate Detection</b><br>content similarity, negation patterns → ADD/UPDATE/CONFLICT/DUPLICATE" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="70" y="585" width="390" height="40" as="geometry"/>
</mxCell>
<!-- ========== Right: Host LLM (Engine) ========== -->
<mxCell id="cl_llm_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="610" y="80" width="450" height="580" as="geometry"/>
</mxCell>
<mxCell id="cl_llm_title" value="<b>Host LLM (Supervisor)</b><br><font style="font-size:10px">High-value judgment, full context, Opus-level</font>" style="text;html=1;align=center;fontSize=14;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="670" y="90" width="330" height="40" as="geometry"/>
</mxCell>
<mxCell id="cl_l1" value="<b>Causal Chain Evaluation</b><br>Review causal candidates: did A really cause B?" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="640" y="145" width="390" height="45" as="geometry"/>
</mxCell>
<mxCell id="cl_l2" value="<b>Semantic Relevance Judgment</b><br>Review grey-zone candidates (cos 0.40-0.80), decide whether to link" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="640" y="210" width="390" height="45" as="geometry"/>
</mxCell>
<mxCell id="cl_l3" value="<b>Entity Enrichment</b><br>Add entities that regex missed (via --entities flag)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="640" y="275" width="390" height="45" as="geometry"/>
</mxCell>
<mxCell id="cl_l4" value="<b>Memory Triage</b><br>Decide what to remember: directives, conclusions, observations" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="640" y="340" width="390" height="45" as="geometry"/>
</mxCell>
<mxCell id="cl_l5" value="<b>Conflict Resolution</b><br>When diff returns CONFLICT, decide keep old or new" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="640" y="405" width="390" height="45" as="geometry"/>
</mxCell>
<mxCell id="cl_l6" value="<b>Result Re-ranking</b><br>Use signals transparency + conversation context for final ranking" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="640" y="470" width="390" height="45" as="geometry"/>
</mxCell>
<mxCell id="cl_l7" value="<b>Category & Importance Assignment</b><br>Classify memory as decision/preference/fact, assign importance 1-5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="640" y="535" width="390" height="45" as="geometry"/>
</mxCell>
<!-- ========== Center: Interaction Arrows ========== -->
<!-- Binary → LLM: candidates -->
<mxCell id="cl_arrow1_label" value="<b>JSON Candidate Output</b><br><font style="font-size:9px">semantic_candidates<br>causal_candidates<br>signals breakdown</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="493" y="240" width="114" height="70" as="geometry"/>
</mxCell>
<mxCell id="cl_arrow1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#d6b656;strokeWidth=2;" edge="1" parent="1" source="cl_arrow1_label" target="cl_l1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="cl_arrow1b" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#d6b656;strokeWidth=2;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="cl_b3" target="cl_arrow1_label">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- LLM → Binary: commands -->
<mxCell id="cl_arrow2_label" value="<b>CLI Commands</b><br><font style="font-size:9px">remember, link,<br>forget, gc --keep</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="493" y="440" width="114" height="60" as="geometry"/>
</mxCell>
<mxCell id="cl_arrow2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#d6b656;strokeWidth=2;" edge="1" parent="1" source="cl_l5" target="cl_arrow2_label">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="cl_arrow2b" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;strokeColor=#d6b656;strokeWidth=2;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="cl_arrow2_label" target="cl_b8">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ========== Bottom: Comparison ========== -->
<mxCell id="cl_cmp_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;dashed=1;" vertex="1" parent="1">
<mxGeometry x="40" y="690" width="1020" height="80" as="geometry"/>
</mxCell>
<mxCell id="cl_cmp" value="<b>vs Embedded LLM (Mem0/MemCP)</b>: gpt-4o-mini inside → API cost per operation, weaker reasoning, network dependency<br><b>LLM-Supervised (Mnemon)</b>: Host LLM (Opus/Sonnet) supervises → zero extra cost, stronger judgment, works offline" style="text;html=1;align=center;fontSize=10;fillColor=none;strokeColor=none;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="60" y="700" width="980" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<!-- ================================================================ -->
<!-- Page 6: Lifecycle & Retention -->
<!-- ================================================================ -->
<diagram id="lifecycle" name="Lifecycle & Retention">
<mxGraphModel dx="1422" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="900" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Title -->
<mxCell id="lc_title" value="<b>Lifecycle & Retention Management</b>" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="300" y="10" width="400" height="30" as="geometry"/>
</mxCell>
<!-- ========== EI Formula ========== -->
<mxCell id="lc_ei_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="40" y="60" width="1020" height="200" as="geometry"/>
</mxCell>
<mxCell id="lc_ei_title" value="<b>Effective Importance (EI) — Decay Formula</b>" style="text;html=1;align=left;fontSize=12;fillColor=none;strokeColor=none;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="60" y="70" width="400" height="20" as="geometry"/>
</mxCell>
<mxCell id="lc_formula" value="<font style="font-size:14px; font-family:monospace;">EI = base_weight × access_factor × decay_factor × edge_factor</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#6c8ebf;fontSize=14;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="120" y="100" width="860" height="35" as="geometry"/>
</mxCell>
<mxCell id="lc_f1" value="<b>base_weight</b><br><font style="font-size:9px">imp 5 → 1.00<br>imp 4 → 0.80<br>imp 3 → 0.50<br>imp 2 → 0.30<br>imp 1 → 0.15</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="60" y="150" width="130" height="95" as="geometry"/>
</mxCell>
<mxCell id="lc_f2" value="<b>access_factor</b><br><font style="font-size:9px">max(1.0,<br>log(1+access_count))<br><br>frequent retrieval = log growth</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6F3FF;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="220" y="150" width="180" height="95" as="geometry"/>
</mxCell>
<mxCell id="lc_f3" value="<b>decay_factor</b><br><font style="font-size:9px">0.5 ^ (days / 30)<br><br>half-life 30 days<br>30d → 0.50<br>60d → 0.25<br>90d → 0.125</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="430" y="150" width="170" height="95" as="geometry"/>
</mxCell>
<mxCell id="lc_f4" value="<b>edge_factor</b><br><font style="font-size:9px">1.0 + 0.1 × min(edges, 5)<br><br>more connections = more important<br>0 edges → 1.0<br>5+ edges → 1.5</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="630" y="150" width="180" height="95" as="geometry"/>
</mxCell>
<!-- ========== Immunity Rules ========== -->
<mxCell id="lc_immune_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="40" y="290" width="480" height="100" as="geometry"/>
</mxCell>
<mxCell id="lc_immune_title" value="<b>Immunity Rules (immune from auto-cleanup)</b>" style="text;html=1;align=left;fontSize=11;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="60" y="300" width="300" height="20" as="geometry"/>
</mxCell>
<mxCell id="lc_im1" value="<font style="font-size:20px">🛡</font> importance ≥ 4" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="60" y="330" width="200" height="40" as="geometry"/>
</mxCell>
<mxCell id="lc_im2" value="<font style="font-size:20px">🛡</font> access_count ≥ 3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#E6FFE6;strokeColor=#82b366;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="280" y="330" width="220" height="40" as="geometry"/>
</mxCell>
<!-- ========== Auto-Prune Flow ========== -->
<mxCell id="lc_prune_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="560" y="290" width="500" height="200" as="geometry"/>
</mxCell>
<mxCell id="lc_prune_title" value="<b>Auto-Prune (trigger: total > 1000)</b>" style="text;html=1;align=left;fontSize=11;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="580" y="300" width="400" height="20" as="geometry"/>
</mxCell>
<mxCell id="lc_p1" value="Count active insights" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="580" y="330" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="lc_pq" value="> 1000?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="750" y="325" width="80" height="40" as="geometry"/>
</mxCell>
<mxCell id="lc_pe1" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="lc_p1" target="lc_pq">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="lc_p2" value="<font style="font-size:9px">Sort by EI ASC<br>exclude immune<br>take bottom 10</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="860" y="322" width="120" height="45" as="geometry"/>
</mxCell>
<mxCell id="lc_pe2" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="lc_pq" target="lc_p2">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="lc_p3" value="Soft delete<br><font style="font-size:9px">SET deleted_at = now()</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="860" y="390" width="120" height="40" as="geometry"/>
</mxCell>
<mxCell id="lc_pe3" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="lc_p2" target="lc_p3">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="lc_p4" value="Cascade delete edges" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="860" y="450" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="lc_pe4" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="lc_p3" target="lc_p4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="lc_pskip" value="No-op" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="748" y="390" width="80" height="25" as="geometry"/>
</mxCell>
<mxCell id="lc_pe5" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="lc_pq" target="lc_pskip">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ========== GC Manual Controls ========== -->
<mxCell id="lc_gc_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="40" y="420" width="480" height="100" as="geometry"/>
</mxCell>
<mxCell id="lc_gc_title" value="<b>Manual GC Controls</b>" style="text;html=1;align=left;fontSize=11;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="60" y="430" width="200" height="20" as="geometry"/>
</mxCell>
<mxCell id="lc_gc1" value="<b>gc --threshold 0.5</b><br><font style="font-size:9px">list candidates with EI < 0.5</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="60" y="460" width="200" height="40" as="geometry"/>
</mxCell>
<mxCell id="lc_gc2" value="<b>gc --keep &lt;id&gt;</b><br><font style="font-size:9px">access_count += 3 → boost retention</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="280" y="460" width="220" height="40" as="geometry"/>
</mxCell>
<!-- ========== Timeline Visualization ========== -->
<mxCell id="lc_time_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;dashed=1;" vertex="1" parent="1">
<mxGeometry x="40" y="555" width="1020" height="120" as="geometry"/>
</mxCell>
<mxCell id="lc_time_title" value="<b>EI Decay Over Time (importance=3, no access)</b>" style="text;html=1;align=left;fontSize=11;fillColor=none;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="60" y="562" width="400" height="20" as="geometry"/>
</mxCell>
<mxCell id="lc_timeline" value="<font style="font-family:monospace; font-size:10px">Day 0 ████████████████████ EI = 0.50 (fresh)<br>Day 15 ███████████████ EI = 0.35 (half-life approaching)<br>Day 30 ██████████ EI = 0.25 (half-life reached)<br>Day 60 █████ EI = 0.13 (candidate for pruning)<br>Day 90 ██ EI = 0.06 (likely pruned)</font>" style="text;html=1;align=left;fontSize=10;fillColor=none;strokeColor=none;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="60" y="585" width="980" height="80" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
<!-- ================================================================ -->
<!-- Page 7: Diff & Dedup Pipeline -->
<!-- ================================================================ -->
<diagram id="diff" name="Built-in Diff (inside remember)">
<mxGraphModel dx="1422" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1000" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Title -->
<mxCell id="d_title" value="<b>Built-in Diff (inside remember)</b><br><font style="font-size:10px">Auto dedup & conflict resolution</font>" style="text;html=1;align=center;verticalAlign=middle;fontSize=16;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="10" width="500" height="40" as="geometry"/>
</mxCell>
<!-- Input -->
<mxCell id="d_input" value="<b>mnemon remember</b> &lt;content&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=12;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="230" y="60" width="440" height="40" as="geometry"/>
</mxCell>
<!-- Step 1: KeywordSearch -->
<mxCell id="d_kw" value="<b>Step 1: KeywordSearch</b><br><font style="font-size:9px">Tokenize new content<br>Score all active insights by token overlap<br>Return top-5 matches</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="290" y="130" width="320" height="65" as="geometry"/>
</mxCell>
<mxCell id="d_e1" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="d_input" target="d_kw">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Step 2: ContentSimilarity -->
<mxCell id="d_sim" value="<b>Step 2: ContentSimilarity</b><br><font style="font-size:9px">For each top-5 match:<br>similarity = |tokens_new ∩ tokens_old| / |tokens_new ∪ tokens_old|</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="275" y="225" width="350" height="60" as="geometry"/>
</mxCell>
<mxCell id="d_e2" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="d_kw" target="d_sim">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Step 3: Negation Detection -->
<mxCell id="d_neg" value="<b>Step 3: Negation Pattern Detection</b><br><font style="font-size:9px">Scan for: not, no longer, don't, never,<br>switched from, replaced, abandoned, changed to</font>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="275" y="315" width="350" height="55" as="geometry"/>
</mxCell>
<mxCell id="d_e3" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="d_sim" target="d_neg">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Decision Diamond: similarity check -->
<mxCell id="d_q1" value="similarity < 0.50?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="375" y="405" width="150" height="70" as="geometry"/>
</mxCell>
<mxCell id="d_e4" style="edgeStyle=orthogonalEdgeStyle;rounded=1;" edge="1" parent="1" source="d_neg" target="d_q1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ADD result -->
<mxCell id="d_add" value="<b>ADD</b><br><font style="font-size:9px">New content, safe to remember</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="100" y="415" width="200" height="50" as="geometry"/>
</mxCell>
<mxCell id="d_e5" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="d_q1" target="d_add">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Diamond: negation? -->
<mxCell id="d_q2" value="negation
detected?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="375" y="510" width="150" height="70" as="geometry"/>
</mxCell>
<mxCell id="d_e6" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="d_q1" target="d_q2">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- CONFLICT result -->
<mxCell id="d_conflict" value="<b>CONFLICT</b><br><font style="font-size:9px">Contradicts existing insight<br>LLM decides: keep old or replace</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="600" y="515" width="240" height="55" as="geometry"/>
</mxCell>
<mxCell id="d_e7" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="d_q2" target="d_conflict">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Diamond: >0.90? -->
<mxCell id="d_q3" value="similarity
> 0.90?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="375" y="615" width="150" height="70" as="geometry"/>
</mxCell>
<mxCell id="d_e8" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="d_q2" target="d_q3">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- DUPLICATE result -->
<mxCell id="d_dup" value="<b>DUPLICATE</b><br><font style="font-size:9px">Already exists, skip remember</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="600" y="625" width="220" height="50" as="geometry"/>
</mxCell>
<mxCell id="d_e9" value="Yes" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="d_q3" target="d_dup">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- UPDATE result -->
<mxCell id="d_update" value="<b>UPDATE</b><br><font style="font-size:9px">Similar but different<br>Consider forget old + remember new</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fce5cd;strokeColor=#d6b656;fontSize=11;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="340" y="720" width="220" height="55" as="geometry"/>
</mxCell>
<mxCell id="d_e10" value="No (0.50-0.90)" style="edgeStyle=orthogonalEdgeStyle;rounded=1;fontSize=9;" edge="1" parent="1" source="d_q3" target="d_update">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- Summary Box -->
<mxCell id="d_summary_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;dashed=1;" vertex="1" parent="1">