-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathtwo-layer-architecture.drawio
More file actions
176 lines (157 loc) · 15.1 KB
/
two-layer-architecture.drawio
File metadata and controls
176 lines (157 loc) · 15.1 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
<mxfile host="app.diagrams.net" modified="2026-02-23T00:00:00.000Z" agent="Claude" version="24.0.0" type="device">
<diagram id="two-layer" name="Two Layers, Deliberately Decoupled">
<mxGraphModel dx="1422" dy="920" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1400" pageHeight="920" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- ==================== TITLE ==================== -->
<mxCell id="title" value="<b>Two Layers, Deliberately Decoupled</b>" style="text;html=1;align=center;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="300" y="15" width="800" height="30" as="geometry"/>
</mxCell>
<mxCell id="subtitle" value="Agent-side pluggability (achieved) · Storage-side pluggability (future direction)" style="text;html=1;align=center;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=12;fontColor=#666666;" vertex="1" parent="1">
<mxGeometry x="300" y="42" width="800" height="20" as="geometry"/>
</mxCell>
<!-- ==================== MCP BAR (standardized) ==================== -->
<mxCell id="mcp_bar" value="<b>MCP</b> (LLM ↔ Tools) — standardized" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8EAF6;strokeColor=#7986CB;fontSize=11;fontColor=#3949AB;" vertex="1" parent="1">
<mxGeometry x="260" y="74" width="880" height="28" as="geometry"/>
</mxCell>
<!-- ==================== TOP: LLM AGENTS ==================== -->
<!-- Agent row background -->
<mxCell id="agent_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F8E9;strokeColor=#7CB342;strokeWidth=2;arcSize=6;" vertex="1" parent="1">
<mxGeometry x="160" y="114" width="1080" height="100" as="geometry"/>
</mxCell>
<mxCell id="agent_label" value="<b>Any LLM CLI Agent</b> (pluggable today via binary + skill)" style="text;html=1;align=left;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=11;fontColor=#558B2F;" vertex="1" parent="1">
<mxGeometry x="180" y="116" width="400" height="22" as="geometry"/>
</mxCell>
<mxCell id="claude" value="<b>Claude Code</b><br><font style="font-size:9px;color:#666">Skill auto-discovery</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="200" y="144" width="160" height="50" as="geometry"/>
</mxCell>
<mxCell id="cursor" value="<b>Cursor</b><br><font style="font-size:9px;color:#666">.cursorrules</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="400" y="144" width="160" height="50" as="geometry"/>
</mxCell>
<mxCell id="openclaw" value="<b>OpenClaw</b><br><font style="font-size:9px;color:#666">Plugin loader</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="600" y="144" width="160" height="50" as="geometry"/>
</mxCell>
<mxCell id="other_agent" value="<b>Any LLM CLI</b><br><font style="font-size:9px;color:#666">System prompt / rules</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=11;" vertex="1" parent="1">
<mxGeometry x="800" y="144" width="160" height="50" as="geometry"/>
</mxCell>
<!-- Checkmark for achieved -->
<mxCell id="check_agent" value="✓ Achieved" style="text;html=1;align=right;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=11;fontColor=#2E7D32;fontStyle=1;" vertex="1" parent="1">
<mxGeometry x="1060" y="116" width="160" height="22" as="geometry"/>
</mxCell>
<!-- ==================== PROTOCOL SURFACE (connection) ==================== -->
<mxCell id="proto_surface" value="<b>Protocol Surface</b> — Intent-native CLI commands · Structured JSON · Lifecycle hooks · Signal metadata" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF9C4;strokeColor=#F9A825;fontSize=11;fontColor=#333;" vertex="1" parent="1">
<mxGeometry x="260" y="234" width="880" height="36" as="geometry"/>
</mxCell>
<!-- Arrows from agents to protocol surface -->
<mxCell id="e_claude" value="" style="endArrow=classic;strokeColor=#82b366;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.2;entryY=0;" edge="1" parent="1" source="claude" target="proto_surface">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e_cursor" value="" style="endArrow=classic;strokeColor=#82b366;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.35;entryY=0;" edge="1" parent="1" source="cursor" target="proto_surface">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e_openclaw" value="" style="endArrow=classic;strokeColor=#82b366;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.55;entryY=0;" edge="1" parent="1" source="openclaw" target="proto_surface">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="e_other" value="" style="endArrow=classic;strokeColor=#82b366;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.75;entryY=0;" edge="1" parent="1" source="other_agent" target="proto_surface">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ==================== MNEMON BOX ==================== -->
<mxCell id="mnemon_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FAFAFA;strokeColor=#999999;strokeWidth=2;arcSize=4;" vertex="1" parent="1">
<mxGeometry x="160" y="290" width="1080" height="380" as="geometry"/>
</mxCell>
<mxCell id="mnemon_label" value="<b style="font-size:16px">Mnemon</b>" style="text;html=1;align=left;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=16;fontColor=#333;" vertex="1" parent="1">
<mxGeometry x="180" y="294" width="120" height="30" as="geometry"/>
</mxCell>
<!-- Protocol Layer -->
<mxCell id="protocol_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;strokeWidth=2;arcSize=6;" vertex="1" parent="1">
<mxGeometry x="200" y="330" width="1000" height="140" as="geometry"/>
</mxCell>
<mxCell id="protocol_label" value="<b>Protocol Layer</b> (Intent-Native)" style="text;html=1;align=left;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=13;fontColor=#1565C0;" vertex="1" parent="1">
<mxGeometry x="220" y="334" width="280" height="24" as="geometry"/>
</mxCell>
<mxCell id="p_cmd" value="<b>Semantic Commands</b><br>remember · recall · link<br><font style="font-size:8px;color:#888">not INSERT / SELECT / CREATE EDGE</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BBDEFB;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="230" y="366" width="180" height="80" as="geometry"/>
</mxCell>
<mxCell id="p_hooks" value="<b>Lifecycle Hooks</b><br>Prime · Remind<br>Nudge · Compact" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BBDEFB;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="430" y="366" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="p_json" value="<b>Structured Output</b><br>JSON with signal<br>transparency" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BBDEFB;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="610" y="366" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="p_cand" value="<b>Candidate Output</b><br>Semantic candidates<br>Causal candidates" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BBDEFB;strokeColor=#6c8ebf;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="800" y="366" width="160" height="80" as="geometry"/>
</mxCell>
<!-- Internal boundary (dashed) -->
<mxCell id="boundary" value="" style="shape=line;strokeColor=#FF8F00;strokeWidth=2;dashed=1;dashPattern=8 4;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="200" y="489" width="1000" height="1" as="geometry"/>
</mxCell>
<mxCell id="boundary_label" value="⬇ storage interface (to be abstracted)" style="text;html=1;align=center;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=10;fontColor=#FF8F00;fontStyle=2;" vertex="1" parent="1">
<mxGeometry x="500" y="482" width="400" height="18" as="geometry"/>
</mxCell>
<!-- Storage Engine -->
<mxCell id="engine_box" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF3E0;strokeColor=#EF6C00;strokeWidth=2;arcSize=6;" vertex="1" parent="1">
<mxGeometry x="200" y="506" width="1000" height="140" as="geometry"/>
</mxCell>
<mxCell id="engine_label" value="<b>Storage Engine</b> (current: SQLite-based)" style="text;html=1;align=left;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=13;fontColor=#BF360C;" vertex="1" parent="1">
<mxGeometry x="220" y="510" width="350" height="24" as="geometry"/>
</mxCell>
<mxCell id="s_graph" value="<b>MAGMA Four-Graph</b><br>temporal · entity<br>causal · semantic" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE0B2;strokeColor=#EF6C00;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="230" y="542" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="s_beam" value="<b>Beam Search</b><br>Intent-adaptive<br>graph traversal" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE0B2;strokeColor=#EF6C00;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="420" y="542" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="s_rrf" value="<b>RRF Fusion</b><br>Multi-signal anchor<br>selection + EI decay" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE0B2;strokeColor=#EF6C00;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="610" y="542" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="s_sqlite" value="<b>SQLite + WAL</b><br>Single-file deploy<br>ACID transactions" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE0B2;strokeColor=#EF6C00;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="800" y="542" width="160" height="80" as="geometry"/>
</mxCell>
<!-- ==================== BOTTOM: FUTURE STORAGE BACKENDS ==================== -->
<mxCell id="future_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F5F5;strokeColor=#BDBDBD;strokeWidth=1;dashed=1;dashPattern=8 4;arcSize=6;" vertex="1" parent="1">
<mxGeometry x="160" y="704" width="1080" height="100" as="geometry"/>
</mxCell>
<mxCell id="future_label" value="<b>Future: Pluggable Storage Backends</b> (not yet implemented)" style="text;html=1;align=left;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=11;fontColor=#9E9E9E;" vertex="1" parent="1">
<mxGeometry x="180" y="706" width="420" height="22" as="geometry"/>
</mxCell>
<mxCell id="f_pg" value="<b>PostgreSQL</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EEEEEE;strokeColor=#BDBDBD;fontSize=11;fontColor=#9E9E9E;" vertex="1" parent="1">
<mxGeometry x="240" y="734" width="160" height="46" as="geometry"/>
</mxCell>
<mxCell id="f_graph" value="<b>Graph DB</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EEEEEE;strokeColor=#BDBDBD;fontSize=11;fontColor=#9E9E9E;" vertex="1" parent="1">
<mxGeometry x="480" y="734" width="160" height="46" as="geometry"/>
</mxCell>
<mxCell id="f_remote" value="<b>Remote Service</b>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EEEEEE;strokeColor=#BDBDBD;fontSize=11;fontColor=#9E9E9E;" vertex="1" parent="1">
<mxGeometry x="720" y="734" width="160" height="46" as="geometry"/>
</mxCell>
<mxCell id="f_dots" value="<b>...</b>" style="text;html=1;align=center;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=16;fontColor=#BDBDBD;" vertex="1" parent="1">
<mxGeometry x="960" y="734" width="80" height="46" as="geometry"/>
</mxCell>
<!-- Dashed arrows from mnemon to future backends -->
<mxCell id="e_future" value="" style="endArrow=classic;strokeColor=#BDBDBD;strokeWidth=1.5;dashed=1;dashPattern=6 3;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="mnemon_box" target="future_bg">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ==================== ODBC/JDBC BAR (standardized) ==================== -->
<mxCell id="odbc_bar" value="<b>ODBC / JDBC</b> (App ↔ DB) — standardized" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8EAF6;strokeColor=#7986CB;fontSize=11;fontColor=#3949AB;" vertex="1" parent="1">
<mxGeometry x="260" y="826" width="880" height="28" as="geometry"/>
</mxCell>
<!-- ==================== SIDE ANNOTATIONS ==================== -->
<!-- Left side: Skill distribution note -->
<mxCell id="skill_note" value="<b>Skill (.md)</b><br>Binary ships skill files<br>that teach each LLM<br>the command protocol" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=10;fontColor=#333;" vertex="1" parent="1">
<mxGeometry x="20" y="144" width="120" height="75" as="geometry"/>
</mxCell>
<mxCell id="e_skill" value="" style="endArrow=classic;strokeColor=#d6b656;strokeWidth=1;dashed=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1" source="skill_note" target="agent_bg">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- ==================== PROTOCOL GAP ANNOTATION ==================== -->
<!-- Right side: gap annotation -->
<mxCell id="gap_brace_top" value="" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;flipH=1;size=0.5;strokeColor=#7986CB;strokeWidth=1.5;" vertex="1" parent="1">
<mxGeometry x="1260" y="100" width="20" height="760" as="geometry"/>
</mxCell>
<mxCell id="gap_label" value="<font color="#3949AB">Mnemon fills the<br><b>protocol gap</b><br>between MCP<br>and ODBC/JDBC</font>" style="text;html=1;align=left;verticalAlign=middle;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="1286" y="430" width="110" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>