mcp-qdrant-reference-architecture.drawio•38.7 kB
<mxfile host="65bd71144e">
<diagram name="MCP + Qdrant Reference-Based Document Architecture" id="mcp-qdrant-ref-arch">
<mxGraphModel dx="893" dy="597" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1800" pageHeight="1400" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="title" value="🔄 MCP + Qdrant Reference-Based Document Architecture" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontStyle=1;fontColor=#1f5582;" parent="1" vertex="1">
<mxGeometry x="200" y="10" width="1400" height="40" as="geometry"/>
</mxCell>
<mxCell id="qdrant-core" value="🧠 Qdrant Vector Database<br>THE SINGLE SOURCE OF TRUTH<br><br>Content in memory, metadata in documents" style="ellipse;whiteSpace=wrap;html=1;fontSize=16;fontStyle=1;fillColor=#e1d5e7;strokeColor=#9673a6;strokeWidth=4;" parent="1" vertex="1">
<mxGeometry x="910" y="600" width="280" height="180" as="geometry"/>
</mxCell>
<mxCell id="collections-title" value="🗄️ Qdrant Collections" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1;fontColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="122" y="305" width="200" height="30" as="geometry"/>
</mxCell>
<mxCell id="memory-collections-title" value="💾 Enhanced Memory Collections (Content Storage)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;fontColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="132" y="335" width="300" height="20" as="geometry"/>
</mxCell>
<mxCell id="global-memory-collection" value="🌍 global_memory<br><br>EXISTING: content, timestamp, category, importance, agent_id<br><br>NEW FIELDS:<br>• source_doc_id (UUID, optional)<br>• source_doc_version (int, optional)<br>• chunk_index (int, optional)<br>• is_current (bool, default true)<br>• content_hash (SHA-256, optional)<br><br>⚡ Content lives here!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#d5e8d4;strokeColor=#82b366;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="130" y="356" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="learned-memory-collection" value="🎓 learned_memory<br><br>EXISTING: content, timestamp, category, importance, agent_id<br><br>NEW FIELDS:<br>• source_doc_id (UUID, optional)<br>• source_doc_version (int, optional)<br>• chunk_index (int, optional)<br>• is_current (bool, default true)<br>• content_hash (SHA-256, optional)<br><br>⚡ Content lives here!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#d5e8d4;strokeColor=#82b366;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="340" y="356" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="agent-memory-collection" value="🤖 agent_memory_*<br><br>EXISTING: content, timestamp, category, importance, agent_id<br><br>NEW FIELDS:<br>• source_doc_id (UUID, optional)<br>• source_doc_version (int, optional)<br>• chunk_index (int, optional)<br>• is_current (bool, default true)<br>• content_hash (SHA-256, optional)<br><br>⚡ Content lives here!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#d5e8d4;strokeColor=#82b366;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="640" y="356" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="doc-collections-title" value="📋 Document Metadata Collections (NO CONTENT)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=12;fontStyle=1;fontColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="160" y="585" width="300" height="20" as="geometry"/>
</mxCell>
<mxCell id="documents-collection" value="📊 documents (metadata only)<br><br>• doc_id (UUID, primary)<br>• title, version (monotonic)<br>• memory_type (global/learned/agent_*)<br>• memory_chunk_ids (array references)<br>• content_hash (SHA-256)<br>• tags, aliases<br>• links_out (doc://<id>)<br>• links_dual (GitHub+Local)<br>• created_at, updated_at<br><br>⚡ NO CONTENT - only references!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#e1d5e7;strokeColor=#9673a6;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="130" y="610" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="doc-versions-collection" value="📚 doc_versions (metadata only)<br><br>• doc_id, version<br>• memory_chunk_ids (historical refs)<br>• content_hash (SHA-256)<br>• change_note<br>• aliases_snapshot<br>• links_out_snapshot<br>• links_dual_snapshot<br>• created_at<br><br>⚡ Immutable history<br>⚡ NO CONTENT - only references!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#fff2cc;strokeColor=#d6b656;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="340" y="610" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="reconstruction-engine" value="🔧 Content Reconstruction Engine<br><br>async def reconstruct_document_content(<br> doc_id: str, version: int = None<br>) -> str:<br> # Get chunk references from documents<br> doc = await get_document(doc_id)<br> <br> # Fetch chunks from memory collections<br> chunks = await get_memory_chunks(<br> ids=doc.memory_chunk_ids<br> )<br> <br> # Reconstruct full content<br> return join_chunks_by_index(chunks)<br><br>⚡ Builds documents from memory chunks!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=8;fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="640" y="610" width="200" height="180" as="geometry"/>
</mxCell>
<mxCell id="mcp-server-title" value="🛠️ MCP Server (Cursor Integration)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1;fontColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="89" y="22" width="400" height="30" as="geometry"/>
</mxCell>
<mxCell id="cursor-agent" value="🤖 Cursor Agent<br><br>Uses MCP tools to:<br>• Create documents<br>• Update knowledge<br>• Search content (unified)<br>• Navigate links<br>• Import legacy docs" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="20" y="70" width="200" height="120" as="geometry"/>
</mxCell>
<mxCell id="mcp-create" value="📝 memory.doc.create<br><br>1. Chunk content<br>2. Store in memory collection<br>3. Create document metadata<br>4. Reconstruct & export .md" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="260" y="80" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="mcp-update" value="🔄 memory.doc.update<br><br>1. Differential analysis<br>2. Update changed chunks<br>3. Version document metadata<br>4. Reconstruct & export .md" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="260" y="170" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="mcp-search" value="🔍 memory.search (enhanced)<br><br>Unified search across:<br>• Standalone memory chunks<br>• Document-organized chunks<br>• Includes document context" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="430" y="80" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="mcp-get" value="📖 memory.doc.get<br><br>1. Get document metadata<br>2. Reconstruct from chunks<br>3. Return full markdown<br>4. Include dual-link headers" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="430" y="170" width="160" height="80" as="geometry"/>
</mxCell>
<mxCell id="write-through-title" value="📤 Write-Through Export with Dual Links" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1;fontColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="1320" y="190" width="400" height="30" as="geometry"/>
</mxCell>
<mxCell id="local-repo" value="📁 Local Repository<br><br>/docs/pdca/overview.md<br>/docs/cmmi/template.md<br>/knowledge/index.md<br><br>Each .md reconstructed from<br>memory chunks with dual-links:<br>[GitHub](url) | [Local](path)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="780" y="110" width="200" height="140" as="geometry"/>
</mxCell>
<mxCell id="dual-link-example" value="📄 Content Reconstruction Example<br><br>[GitHub](https://github.com/org/repo/blob/abc123/docs/pdca/overview.md) | [Local](./docs/pdca/overview.md)<br><br># PDCA Overview<br>This document describes the PDCA workflow...<br><br>⚡ Content reconstructed from memory chunks!<br>⚡ Always dual links in every .md file!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#e6ffcc;strokeColor=#82b366;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="1310" y="250" width="420" height="120" as="geometry"/>
</mxCell>
<mxCell id="crawler-title" value="🕷️ Crawler (Bootstrap / Legacy Sync)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1;fontColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="80" y="920" width="400" height="30" as="geometry"/>
</mxCell>
<mxCell id="crawler-process" value="🎯 Reference-Based Crawler Process<br><br>1. Start from README.md (local/GitHub)<br>2. Extract content and chunk semantically<br>3. Store chunks in memory collections<br>4. Create document metadata with chunk refs<br>5. Extract dual-link rows: record aliases<br>6. Resolve links → internal URIs (doc://id)<br><br>⚡ Content stored in existing memory infrastructure!<br>⚡ Documents provide organization via references!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#ffe6cc;strokeColor=#d79b00;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="80" y="990" width="320" height="160" as="geometry"/>
</mxCell>
<mxCell id="seed-files" value="🌱 Seed Files<br><br>• README.md<br>• index.md<br>• Any starting .md<br><br>Content chunked and<br>stored in memory<br>collections" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="540" y="880" width="140" height="120" as="geometry"/>
</mxCell>
<mxCell id="legacy-docs" value="📚 Legacy Docs<br><br>Existing .md scattered<br>across repo:<br>• components/<br>• docs/<br>• scrum.pmo/<br>• recovery.analysis/<br><br>Content imported to<br>memory collections" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="540" y="1010" width="140" height="140" as="geometry"/>
</mxCell>
<mxCell id="data-flows-title" value="🔄 Reference-Based Data Flows" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;fontColor=#1f5582;" parent="1" vertex="1">
<mxGeometry x="1290" y="950" width="300" height="30" as="geometry"/>
</mxCell>
<mxCell id="new-knowledge-flow" value="✨ New Knowledge Flow<br><br>Agent → memory.doc.create<br>↓<br>Content chunking<br>↓<br>Memory storage (with doc refs)<br>↓<br>Document metadata creation<br>↓<br>Content reconstruction<br>↓<br>Export .md with dual links<br>↓<br>Commit/push → aliases updated" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#e6ffcc;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="1100" y="1000" width="160" height="190" as="geometry"/>
</mxCell>
<mxCell id="update-knowledge-flow" value="🔄 Update Knowledge Flow<br><br>Agent → memory.doc.update<br>(with prev_version=N)<br>↓<br>Differential chunk analysis<br>↓<br>Update MODIFIED chunks only<br>↓<br>Document version++<br>↓<br>Content reconstruction<br>↓<br>Export updated .md<br>↓<br>Commit/push" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="1270" y="1000" width="160" height="190" as="geometry"/>
</mxCell>
<mxCell id="retrieve-knowledge-flow" value="🔍 Enhanced Search Flow<br><br>Agent → memory.search<br>↓<br>Unified search across:<br>• Standalone memory<br>• Document chunks<br>↓<br>Results with document context<br><br>Agent → memory.doc.get<br>↓<br>Content reconstruction<br>↓<br>Full markdown with dual-links" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="1440" y="1000" width="160" height="190" as="geometry"/>
</mxCell>
<mxCell id="import-legacy-flow" value="🕷️ Import Legacy Flow<br><br>Agent → memory.import<br>{ seed: README.md }<br>↓<br>Crawler discovers .md files<br>↓<br>Content chunking<br>↓<br>Memory storage with doc refs<br>↓<br>Document metadata creation<br>↓<br>Link resolution<br><br>⚡ Leverages existing memory!" style="rounded=1;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="1610" y="1000" width="160" height="190" as="geometry"/>
</mxCell>
<mxCell id="guarantees-title" value="⚙️ Reference-Based System Guarantees" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1;fontColor=#1f5582;" parent="1" vertex="1">
<mxGeometry x="1320" y="390" width="350" height="30" as="geometry"/>
</mxCell>
<mxCell id="guarantees-list" value="✅ Memory collections = content source of truth<br>✅ Documents = lightweight metadata organization<br>✅ Content reconstruction from memory chunks<br>✅ .md files = mirrors with dual-link headers<br>✅ Immutable history via chunk references<br>✅ Backward compatibility - existing tools unchanged<br>✅ Unified search (memory + documents)<br>✅ Storage efficiency - no content duplication<br>✅ Differential updates - only changed chunks<br>✅ 80% code reuse from existing infrastructure" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#e1d5e7;strokeColor=#9673a6;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="1320" y="430" width="400" height="160" as="geometry"/>
</mxCell>
<mxCell id="typical-workflow-title" value="🚀 Reference-Based Workflow in Cursor" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1;fontColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="1320" y="610" width="350" height="30" as="geometry"/>
</mxCell>
<mxCell id="workflow-steps" value="1️⃣ Create doc: memory.doc.create<br> → Content chunked → Memory storage → Document metadata<br> → Content reconstructed → File exported with dual-links<br><br>2️⃣ Update doc: memory.doc.update<br> → Differential analysis → Changed chunks updated<br> → Content reconstructed → Updated .md committed<br><br>3️⃣ Search: memory.search (enhanced)<br> → Unified results from memory + document chunks<br><br>4️⃣ Import legacy: memory.import<br> → Content stored in memory → Document refs created" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=2;" parent="1" vertex="1">
<mxGeometry x="1320" y="650" width="400" height="160" as="geometry"/>
</mxCell>
<mxCell id="flow-cursor-to-create" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b85450;strokeWidth=3;" parent="1" source="cursor-agent" target="mcp-create" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="230" y="120"/>
<mxPoint x="230" y="120"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="flow-cursor-to-search" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b85450;strokeWidth=2;" parent="1" source="cursor-agent" target="mcp-search" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="250" y="100"/>
<mxPoint x="250" y="60"/>
<mxPoint x="510" y="60"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="flow-create-to-memory" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#82b366;strokeWidth=3;exitX=0.035;exitY=0.981;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="mcp-create" target="global-memory-collection" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="250" y="158"/>
<mxPoint x="250" y="300"/>
<mxPoint x="230" y="300"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="flow-create-to-docs" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9673a6;strokeWidth=3;" parent="1" source="mcp-create" target="documents-collection" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="240" y="140"/>
<mxPoint x="240" y="280"/>
<mxPoint x="60" y="280"/>
<mxPoint x="60" y="710"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="flow-search-to-memory" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#82b366;strokeWidth=3;" parent="1" source="mcp-search" target="learned-memory-collection" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="660" y="100"/>
<mxPoint x="660" y="300"/>
<mxPoint x="440" y="300"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="flow-reconstruction" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b85450;strokeWidth=3;dashed=1;" parent="1" source="documents-collection" target="reconstruction-engine" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="230" y="604"/>
<mxPoint x="560" y="604"/>
<mxPoint x="560" y="700"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="flow-reconstruction-to-memory" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#b85450;strokeWidth=2;dashed=1;startArrow=classic;startFill=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" edge="1" target="agent-memory-collection">
<mxGeometry relative="1" as="geometry">
<Array as="points"/>
<mxPoint x="740.0000000000005" y="610" as="sourcePoint"/>
<mxPoint x="740.0000000000005" y="570" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="flow-crawler-to-qdrant" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#d79b00;strokeWidth=3;dashed=1;exitX=0.994;exitY=0.857;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="crawler-process" target="qdrant-core" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="450" y="1127"/>
<mxPoint x="450" y="1170"/>
<mxPoint x="940" y="1170"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="collections-to-core4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9673a6;strokeWidth=2;dashed=1;startArrow=classic;startFill=1;" parent="1" source="documents-collection" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="230" y="840"/>
<mxPoint x="910" y="840"/>
<mxPoint x="910" y="740"/>
</Array>
<mxPoint x="930" y="740" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="collections-to-core5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#d6b656;strokeWidth=2;dashed=1;entryX=0.013;entryY=0.661;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;" parent="1" source="doc-versions-collection" target="qdrant-core" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="810"/>
<mxPoint x="870" y="810"/>
<mxPoint x="870" y="740"/>
<mxPoint x="890" y="740"/>
<mxPoint x="890" y="719"/>
</Array>
<mxPoint x="910" y="720" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="export-flow1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9673a6;strokeWidth=4;" parent="1" source="qdrant-core" target="github-repo" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1060" y="500"/>
<mxPoint x="1170" y="500"/>
</Array>
<mxPoint x="1050" y="600" as="sourcePoint"/>
<mxPoint x="1140" y="180" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="github-repo" value="☁️ GitHub Repository<br><br>github.com/org/repo/blob/<br>• /docs/pdca/overview.md<br>• /docs/cmmi/template.md<br>• /knowledge/index.md<br><br>Content reconstructed from<br>memory chunks with dual-links" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="1070" y="110" width="200" height="140" as="geometry"/>
</mxCell>
<mxCell id="export-flow2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#9673a6;strokeWidth=4;entryX=0.458;entryY=0.991;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" target="local-repo" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="1020" y="500"/>
<mxPoint x="872" y="500"/>
</Array>
<mxPoint x="1020" y="601" as="sourcePoint"/>
<mxPoint x="1130" y="251" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="architecture-summary" value="🎯 Reference-Based Architecture Summary<br><br>• Memory Collections = Content storage (global, learned, agent_*)<br>• Document Collections = Lightweight metadata with chunk references<br>• Content Reconstruction = On-demand assembly from memory chunks<br>• MCP Server = Enhanced interface (backward compatible tools)<br>• Write-through export = .md mirrors reconstructed with dual links<br>• Unified search = Memory + documents via existing infrastructure<br>• 80% code reuse = Leverage existing memory management<br>• Zero breaking changes = Existing memory tools work unchanged" style="rounded=1;whiteSpace=wrap;html=1;fontSize=11;fillColor=#f0f8ff;strokeColor=#1f5582;strokeWidth=3;fontStyle=1;" parent="1" vertex="1">
<mxGeometry x="80" y="1220" width="520" height="140" as="geometry"/>
</mxCell>
<mxCell id="flow-legend" value="🎨 Reference-Based Flow Legend<br><br>🔴 Cursor → MCP tools<br>🟢 Content → Memory collections (chunks)<br>🟣 Metadata → Document collections (refs)<br>🔵 Content reconstruction (dashed)<br>🟡 Qdrant → Export (write-through)<br>🟠 Local → GitHub sync<br>🟤 Crawler import (dashed)<br>⚫ Collection membership (dashed)" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;fillColor=#f5f5f5;strokeColor=#666666;" parent="1" vertex="1">
<mxGeometry x="1280" y="1220" width="260" height="140" as="geometry"/>
</mxCell>
<mxCell id="section-crawler" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;dashed=1;dashPattern=1 4;" parent="1" vertex="1">
<mxGeometry x="60" y="870" width="640" height="310" as="geometry"/>
</mxCell>
<mxCell id="section-flows" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;dashed=1;dashPattern=1 4;" parent="1" vertex="1">
<mxGeometry x="1080" y="940" width="710" height="265" as="geometry"/>
</mxCell>
<mxCell id="section-export" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;dashed=1;dashPattern=1 4;" parent="1" vertex="1">
<mxGeometry x="1290" y="170" width="470" height="720" as="geometry"/>
</mxCell>
<mxCell id="2" value="" style="endArrow=classic;html=1;exitX=0.977;exitY=0.934;exitDx=0;exitDy=0;exitPerimeter=0;strokeWidth=2;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;startArrow=classic;startFill=1;" parent="1" source="agent-memory-collection" target="qdrant-core" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="900" y="570" as="sourcePoint"/>
<mxPoint x="950" y="520" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="3" value="" style="endArrow=classic;html=1;exitX=0.977;exitY=0.934;exitDx=0;exitDy=0;exitPerimeter=0;strokeWidth=2;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;entryX=0.096;entryY=0.164;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;" parent="1" target="qdrant-core" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="530" y="527.5" as="sourcePoint"/>
<mxPoint x="655" y="624.5" as="targetPoint"/>
<Array as="points">
<mxPoint x="620" y="550"/>
<mxPoint x="830" y="550"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="4" value="" style="endArrow=classic;html=1;exitX=0.977;exitY=0.934;exitDx=0;exitDy=0;exitPerimeter=0;strokeWidth=2;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;entryX=0.044;entryY=0.256;entryDx=0;entryDy=0;entryPerimeter=0;startArrow=classic;startFill=1;" parent="1" target="qdrant-core" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="310" y="536" as="sourcePoint"/>
<mxPoint x="717" y="638.5" as="targetPoint"/>
<Array as="points">
<mxPoint x="310" y="570"/>
<mxPoint x="820" y="570"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="7" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.597;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=#fff2cc;strokeColor=#d6b656;strokeWidth=3;" edge="1" parent="1" source="mcp-update" target="doc-versions-collection">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="340" y="350" as="sourcePoint"/>
<mxPoint x="390" y="300" as="targetPoint"/>
<Array as="points">
<mxPoint x="340" y="320"/>
<mxPoint x="590" y="320"/>
<mxPoint x="580" y="683"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="8" value="" style="endArrow=classic;html=1;exitX=0.91;exitY=1.016;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.692;entryY=1.028;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;fillColor=#d5e8d4;strokeColor=#82b366;strokeWidth=3;" edge="1" parent="1" source="mcp-get" target="documents-collection">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="410" y="500" as="sourcePoint"/>
<mxPoint x="460" y="450" as="targetPoint"/>
<Array as="points">
<mxPoint x="576" y="500"/>
<mxPoint x="570" y="830"/>
<mxPoint x="270" y="830"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="9" value="" style="endArrow=classic;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0.017;entryY=0.057;entryDx=0;entryDy=0;entryPerimeter=0;strokeWidth=3;dashed=1;fillColor=#d5e8d4;strokeColor=#82b366;" edge="1" parent="1" source="mcp-get" target="reconstruction-engine">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="410" y="600" as="sourcePoint"/>
<mxPoint x="460" y="550" as="targetPoint"/>
<Array as="points">
<mxPoint x="600" y="330"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="10" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.011;entryY=0.329;entryDx=0;entryDy=0;entryPerimeter=0;strokeWidth=3;fillColor=#d5e8d4;strokeColor=#82b366;" edge="1" parent="1" source="mcp-search" target="documents-collection">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="480" y="520" as="sourcePoint"/>
<mxPoint x="530" y="470" as="targetPoint"/>
<Array as="points">
<mxPoint x="630" y="120"/>
<mxPoint x="630" y="210"/>
<mxPoint x="630" y="290"/>
<mxPoint x="90" y="290"/>
<mxPoint x="90" y="670"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="11" value="" style="endArrow=classic;html=1;exitX=0.418;exitY=0.984;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.147;entryY=-0.023;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;strokeWidth=3;" edge="1" parent="1" source="global-memory-collection" target="reconstruction-engine">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="300" y="600" as="sourcePoint"/>
<mxPoint x="350" y="550" as="targetPoint"/>
<Array as="points">
<mxPoint x="214" y="580"/>
<mxPoint x="670" y="580"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="12" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.355;entryY=-0.018;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=#d5e8d4;strokeColor=#82b366;strokeWidth=3;dashed=1;" edge="1" parent="1" source="learned-memory-collection" target="reconstruction-engine">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="300" y="600" as="sourcePoint"/>
<mxPoint x="350" y="550" as="targetPoint"/>
<Array as="points">
<mxPoint x="440" y="560"/>
<mxPoint x="711" y="560"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="13" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;dashed=1;dashPattern=1 4;" vertex="1" parent="1">
<mxGeometry x="70" y="880" width="640" height="310" as="geometry"/>
</mxCell>
<mxCell id="15" value="" style="endArrow=classic;html=1;exitX=0.291;exitY=1.019;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.585;entryY=1.291;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=#fff2cc;strokeColor=#d6b656;strokeWidth=3;" edge="1" parent="1" source="mcp-update" target="memory-collections-title">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="540" y="430" as="sourcePoint"/>
<mxPoint x="590" y="380" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="16" value="" style="endArrow=classic;html=1;exitX=0.081;exitY=0.982;exitDx=0;exitDy=0;exitPerimeter=0;entryX=-0.003;entryY=0.114;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=#fff2cc;strokeColor=#d6b656;strokeWidth=3;" edge="1" parent="1" source="mcp-update" target="documents-collection">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="540" y="500" as="sourcePoint"/>
<mxPoint x="590" y="450" as="targetPoint"/>
<Array as="points">
<mxPoint x="270" y="310"/>
<mxPoint x="110" y="310"/>
<mxPoint x="110" y="631"/>
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>