diff --git a/prototype/kg-demo/README.md b/prototype/kg-demo/README.md new file mode 100644 index 0000000..966000d --- /dev/null +++ b/prototype/kg-demo/README.md @@ -0,0 +1,146 @@ +# š§ Knowledge Graph Demo: Multi-Scale Memory Organization + +## Overview + +This prototype demonstrates how **raw mementos** (unstructured observations) are transformed into a **structured knowledge graph** with hierarchy, entities, and relationships across multiple scales. + +## The WOW Factor ⨠+ +This demo showcases: + +1. **Raw Mementos** ā The original unstructured observations from our conversation +2. **Surgical Extraction** ā Entities pulled from mementos with full traceability +3. **Multi-Scale Hierarchy** ā 4 levels of abstraction (Domain ā System ā Component ā Atomic) +4. **Rich Relationships** ā 16 typed connections showing how concepts relate +5. **Full Provenance** ā Every entity traces back to source mementos + +## Files Generated + +### š `graph.json` +Complete structured data export with: +- 15 raw mementos (the original observations) +- 14 extracted entities across 4 scale levels +- 16 relationships between entities +- Full statistics and provenance tracking + +### šØ `interactive_graph.html` +**Interactive visualization** with: +- Drag-and-drop force-directed graph +- Color-coded entity types +- Size-coded hierarchy scales +- Click nodes to see source mementos +- Physics simulation for natural layout + +**To view:** Open in any web browser + +### šļø `graph.cypher` +Neo4j Cypher script for database import: +- Creates all mementos as nodes +- Creates all entities as nodes +- Establishes relationships +- Links entities back to source mementos via `EXTRACTED_TO` relationships + +**To use:** +```bash +# Option 1: Neo4j Browser +# Copy/paste into Neo4j Browser at http://localhost:7474 + +# Option 2: cypher-shell +cat graph.cypher | cypher-shell -u neo4j -p yourpassword +``` + +### š `graph.mmd` +Mermaid diagram for quick visualization: +- Hierarchical layout +- Relationship labels +- Color-coded by entity type + +**To render:** +- GitHub/GitLab (renders automatically) +- VS Code (with Mermaid extension) +- Online: https://mermaid.live + +## Multi-Scale Architecture + +### Domain Scale (Highest Level) +- **User** - The person (you) +- **AI Memory Systems** - The broader field + +### System Scale +- **Memento Project** - The complete system being built + +### Component Scale +- **Neo4j** - Graph database +- **FastMCP** - Python framework +- **Model Context Protocol** - Integration protocol +- **Local Embeddings** - Semantic search component + +### Atomic Scale (Finest Detail) +- **Feature Branch** - Current working branch +- **Agent Isolation** - Isolation concept +- **Tasks** - Specific implementation work +- **ADR-006** - Architectural decision +- **Preferences** - Your stated preferences + +## Key Insights from the Graph + +1. **You value hierarchy and structure** - evident from preference nodes +2. **Memento uses a layered architecture** - MCP ā Neo4j ā Embeddings +3. **Isolation is important** - both conceptually and practically (branch) +4. **Client-side intelligence** - ADR-006 guides architectural decisions +5. **Active development** - 2 tasks in progress, building toward demo + +## Data Flow + +``` +Raw Conversation + ā + Mementos (m001-m015) + ā + Entity Extraction + ā + Entities (e_user, e_memento, etc.) + ā + Relationship Mapping + ā + Knowledge Graph +``` + +## Running the Demo + +```bash +# Generate all outputs +python3 knowledge_graph_demo.py + +# View interactive visualization +open interactive_graph.html + +# Or on Linux +xdg-open interactive_graph.html +``` + +## Statistics + +- **15 raw mementos** ā original observations +- **14 entities** ā structured concepts +- **16 relationships** ā connections +- **4 scales** ā levels of hierarchy +- **6 entity types** ā Person, Project, Technology, Concept, Task, Preference + +## Why This Matters for Memento + +This demo proves the core concept: + +1. **Mementos are preserved** - raw data never lost +2. **Surgical extraction** - entities cleanly pulled from source +3. **Multi-scale organization** - from high-level concepts to specific details +4. **Relationship-rich** - not just facts, but how they connect +5. **Queryable at any level** - can zoom in/out through the hierarchy + +This is exactly what Memento will do for LLM memory - transform unstructured conversation into queryable knowledge graphs! + +--- + +**Generated:** 2025-11-16 +**Session:** claude/knowledge-graph-prototype-016woGkvRjndwTdvaeEGhz73 +**Isolated Environment:** ā diff --git a/prototype/kg-demo/graph.cypher b/prototype/kg-demo/graph.cypher new file mode 100644 index 0000000..6adee54 --- /dev/null +++ b/prototype/kg-demo/graph.cypher @@ -0,0 +1,264 @@ +// Knowledge Graph Demo - Neo4j Cypher Script + +// Clean slate +MATCH (n) DETACH DELETE n; + +// ============ RAW MEMENTOS ============ +CREATE (:m001:Memento { + id: "m001", + content: "User is working on a project called Memento", + timestamp: datetime("2025-11-16T00:01:00Z"), + source: "conversation" +}); +CREATE (:m002:Memento { + id: "m002", + content: "Memento is an MCP server that provides persistent memory for LLMs", + timestamp: datetime("2025-11-16T00:01:30Z"), + source: "conversation" +}); +CREATE (:m003:Memento { + id: "m003", + content: "The project uses Python with FastMCP framework", + timestamp: datetime("2025-11-16T00:02:00Z"), + source: "conversation" +}); +CREATE (:m004:Memento { + id: "m004", + content: "The project uses Neo4j for graph-based vector storage", + timestamp: datetime("2025-11-16T00:02:15Z"), + source: "conversation" +}); +CREATE (:m005:Memento { + id: "m005", + content: "User is working in an isolated cloud environment", + timestamp: datetime("2025-11-16T00:03:00Z"), + source: "conversation" +}); +CREATE (:m006:Memento { + id: "m006", + content: "Current branch is claude/knowledge-graph-prototype-016woGkvRjndwTdvaeEGhz73", + timestamp: datetime("2025-11-16T00:03:15Z"), + source: "conversation" +}); +CREATE (:m007:Memento { + id: "m007", + content: "User cares about isolation from other agents", + timestamp: datetime("2025-11-16T00:04:00Z"), + source: "conversation" +}); +CREATE (:m008:Memento { + id: "m008", + content: "The project has two main tasks in progress: local embeddings and basic demo", + timestamp: datetime("2025-11-16T00:04:30Z"), + source: "conversation" +}); +CREATE (:m009:Memento { + id: "m009", + content: "User wants to see knowledge organized with hierarchy, entities, and relationships", + timestamp: datetime("2025-11-16T00:05:00Z"), + source: "conversation" +}); +CREATE (:m010:Memento { + id: "m010", + content: "User values the WOW factor in visualizations", + timestamp: datetime("2025-11-16T00:05:15Z"), + source: "conversation" +}); +CREATE (:m011:Memento { + id: "m011", + content: "The project uses sentence-transformers for local embeddings", + timestamp: datetime("2025-11-16T00:05:30Z"), + source: "conversation" +}); +CREATE (:m012:Memento { + id: "m012", + content: "User distinguishes between raw 'Mementos' and structured knowledge", + timestamp: datetime("2025-11-16T00:05:45Z"), + source: "conversation" +}); +CREATE (:m013:Memento { + id: "m013", + content: "The architecture leverages client LLM instead of server-side LLM (ADR-006)", + timestamp: datetime("2025-11-16T00:06:00Z"), + source: "conversation" +}); +CREATE (:m014:Memento { + id: "m014", + content: "Neo4j supports both graph relationships and vector embeddings in single database", + timestamp: datetime("2025-11-16T00:06:15Z"), + source: "conversation" +}); +CREATE (:m015:Memento { + id: "m015", + content: "User asked about worktrees and operating system - they are technical", + timestamp: datetime("2025-11-16T00:06:30Z"), + source: "conversation" +}); + +// ============ ENTITIES ============ +CREATE (:e_user:Person { + id: "e_user", + name: "User", + scale: "domain", + role: "developer", expertise: "technical" +}); +CREATE (:e_ai_memory:Concept { + id: "e_ai_memory", + name: "AI Memory Systems", + scale: "domain", + domain: "artificial_intelligence", subdomain: "memory" +}); +CREATE (:e_memento:Project { + id: "e_memento", + name: "Memento Project", + scale: "system", + status: "in_development", purpose: "LLM persistent memory" +}); +CREATE (:e_neo4j:Technology { + id: "e_neo4j", + name: "Neo4j", + scale: "component", + category: "database", features: "graph+vector" +}); +CREATE (:e_fastmcp:Technology { + id: "e_fastmcp", + name: "FastMCP", + scale: "component", + category: "framework", language: "python" +}); +CREATE (:e_mcp:Technology { + id: "e_mcp", + name: "Model Context Protocol", + scale: "component", + category: "protocol", purpose: "LLM tool integration" +}); +CREATE (:e_embeddings:Technology { + id: "e_embeddings", + name: "Local Embeddings", + scale: "component", + provider: "sentence-transformers", model: "all-MiniLM-L6-v2" +}); +CREATE (:e_branch:Concept { + id: "e_branch", + name: "Feature Branch", + scale: "atomic", + name: "claude/knowledge-graph-prototype-016woGkvRjndwTdvaeEGhz73" +}); +CREATE (:e_isolation:Concept { + id: "e_isolation", + name: "Agent Isolation", + scale: "atomic", + importance: "high", reason: "prevent interference" +}); +CREATE (:e_task_embeddings:Task { + id: "e_task_embeddings", + name: "Implement Local Embeddings", + scale: "atomic", + status: "in_progress", epic: "core_components" +}); +CREATE (:e_task_demo:Task { + id: "e_task_demo", + name: "Basic Demo", + scale: "atomic", + status: "in_progress", epic: "core_components" +}); +CREATE (:e_adr006:Concept { + id: "e_adr006", + name: "ADR-006: Leverage Client LLM", + scale: "atomic", + decision: "use_client_llm", principle: "YAGNI" +}); +CREATE (:e_pref_hierarchy:Preference { + id: "e_pref_hierarchy", + name: "Preference: Hierarchical Organization", + scale: "atomic", + valued: "hierarchy, entities, relationships" +}); +CREATE (:e_pref_wow:Preference { + id: "e_pref_wow", + name: "Preference: WOW Factor", + scale: "atomic", + valued: "impressive visualizations" +}); + +// ============ RELATIONSHIPS ============ +MATCH (s:e_user), (t:e_memento) +CREATE (s)-[:WORKS_ON {role: "creator"}]->(t); +MATCH (s:e_user), (t:e_isolation) +CREATE (s)-[:VALUES {priority: "high"}]->(t); +MATCH (s:e_user), (t:e_pref_hierarchy) +CREATE (s)-[:HAS_PREFERENCE]->(t); +MATCH (s:e_user), (t:e_pref_wow) +CREATE (s)-[:HAS_PREFERENCE]->(t); +MATCH (s:e_memento), (t:e_ai_memory) +CREATE (s)-[:BELONGS_TO_DOMAIN]->(t); +MATCH (s:e_memento), (t:e_mcp) +CREATE (s)-[:IMPLEMENTS {role: "server"}]->(t); +MATCH (s:e_memento), (t:e_fastmcp) +CREATE (s)-[:USES {purpose: "framework"}]->(t); +MATCH (s:e_memento), (t:e_neo4j) +CREATE (s)-[:USES {purpose: "storage"}]->(t); +MATCH (s:e_memento), (t:e_embeddings) +CREATE (s)-[:USES {purpose: "semantic_search"}]->(t); +MATCH (s:e_neo4j), (t:e_embeddings) +CREATE (s)-[:STORES {data_type: "vector_embeddings"}]->(t); +MATCH (s:e_adr006), (t:e_memento) +CREATE (s)-[:GUIDES {aspect: "architecture"}]->(t); +MATCH (s:e_task_embeddings), (t:e_memento) +CREATE (s)-[:CONTRIBUTES_TO {phase: "1"}]->(t); +MATCH (s:e_task_demo), (t:e_memento) +CREATE (s)-[:CONTRIBUTES_TO {phase: "1"}]->(t); +MATCH (s:e_task_embeddings), (t:e_embeddings) +CREATE (s)-[:IMPLEMENTS]->(t); +MATCH (s:e_branch), (t:e_isolation) +CREATE (s)-[:PROVIDES {mechanism: "git_branch"}]->(t); +MATCH (s:e_user), (t:e_branch) +CREATE (s)-[:WORKS_IN {environment: "cloud"}]->(t); + +// ============ MEMENTO -> ENTITY EXTRACTION ============ +MATCH (m:m001), (e:e_user) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m007), (e:e_user) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m009), (e:e_user) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m015), (e:e_user) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m002), (e:e_ai_memory) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m012), (e:e_ai_memory) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m001), (e:e_memento) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m002), (e:e_memento) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m003), (e:e_memento) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m004), (e:e_neo4j) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m014), (e:e_neo4j) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m003), (e:e_fastmcp) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m002), (e:e_mcp) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m008), (e:e_embeddings) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m011), (e:e_embeddings) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m006), (e:e_branch) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m005), (e:e_isolation) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m007), (e:e_isolation) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m008), (e:e_task_embeddings) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m008), (e:e_task_demo) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m013), (e:e_adr006) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m009), (e:e_pref_hierarchy) +CREATE (m)-[:EXTRACTED_TO]->(e); +MATCH (m:m010), (e:e_pref_wow) +CREATE (m)-[:EXTRACTED_TO]->(e); \ No newline at end of file diff --git a/prototype/kg-demo/graph.json b/prototype/kg-demo/graph.json new file mode 100644 index 0000000..5ab5efe --- /dev/null +++ b/prototype/kg-demo/graph.json @@ -0,0 +1,477 @@ +{ + "mementos": [ + { + "id": "m001", + "content": "User is working on a project called Memento", + "timestamp": "2025-11-16T00:01:00Z", + "source": "conversation" + }, + { + "id": "m002", + "content": "Memento is an MCP server that provides persistent memory for LLMs", + "timestamp": "2025-11-16T00:01:30Z", + "source": "conversation" + }, + { + "id": "m003", + "content": "The project uses Python with FastMCP framework", + "timestamp": "2025-11-16T00:02:00Z", + "source": "conversation" + }, + { + "id": "m004", + "content": "The project uses Neo4j for graph-based vector storage", + "timestamp": "2025-11-16T00:02:15Z", + "source": "conversation" + }, + { + "id": "m005", + "content": "User is working in an isolated cloud environment", + "timestamp": "2025-11-16T00:03:00Z", + "source": "conversation" + }, + { + "id": "m006", + "content": "Current branch is claude/knowledge-graph-prototype-016woGkvRjndwTdvaeEGhz73", + "timestamp": "2025-11-16T00:03:15Z", + "source": "conversation" + }, + { + "id": "m007", + "content": "User cares about isolation from other agents", + "timestamp": "2025-11-16T00:04:00Z", + "source": "conversation" + }, + { + "id": "m008", + "content": "The project has two main tasks in progress: local embeddings and basic demo", + "timestamp": "2025-11-16T00:04:30Z", + "source": "conversation" + }, + { + "id": "m009", + "content": "User wants to see knowledge organized with hierarchy, entities, and relationships", + "timestamp": "2025-11-16T00:05:00Z", + "source": "conversation" + }, + { + "id": "m010", + "content": "User values the WOW factor in visualizations", + "timestamp": "2025-11-16T00:05:15Z", + "source": "conversation" + }, + { + "id": "m011", + "content": "The project uses sentence-transformers for local embeddings", + "timestamp": "2025-11-16T00:05:30Z", + "source": "conversation" + }, + { + "id": "m012", + "content": "User distinguishes between raw 'Mementos' and structured knowledge", + "timestamp": "2025-11-16T00:05:45Z", + "source": "conversation" + }, + { + "id": "m013", + "content": "The architecture leverages client LLM instead of server-side LLM (ADR-006)", + "timestamp": "2025-11-16T00:06:00Z", + "source": "conversation" + }, + { + "id": "m014", + "content": "Neo4j supports both graph relationships and vector embeddings in single database", + "timestamp": "2025-11-16T00:06:15Z", + "source": "conversation" + }, + { + "id": "m015", + "content": "User asked about worktrees and operating system - they are technical", + "timestamp": "2025-11-16T00:06:30Z", + "source": "conversation" + } + ], + "entities": [ + { + "id": "e_user", + "name": "User", + "type": "Person", + "properties": { + "role": "developer", + "expertise": "technical" + }, + "scale": "domain", + "extracted_from": [ + "m001", + "m007", + "m009", + "m015" + ] + }, + { + "id": "e_ai_memory", + "name": "AI Memory Systems", + "type": "Concept", + "properties": { + "domain": "artificial_intelligence", + "subdomain": "memory" + }, + "scale": "domain", + "extracted_from": [ + "m002", + "m012" + ] + }, + { + "id": "e_memento", + "name": "Memento Project", + "type": "Project", + "properties": { + "status": "in_development", + "purpose": "LLM persistent memory" + }, + "scale": "system", + "extracted_from": [ + "m001", + "m002", + "m003" + ] + }, + { + "id": "e_neo4j", + "name": "Neo4j", + "type": "Technology", + "properties": { + "category": "database", + "features": "graph+vector" + }, + "scale": "component", + "extracted_from": [ + "m004", + "m014" + ] + }, + { + "id": "e_fastmcp", + "name": "FastMCP", + "type": "Technology", + "properties": { + "category": "framework", + "language": "python" + }, + "scale": "component", + "extracted_from": [ + "m003" + ] + }, + { + "id": "e_mcp", + "name": "Model Context Protocol", + "type": "Technology", + "properties": { + "category": "protocol", + "purpose": "LLM tool integration" + }, + "scale": "component", + "extracted_from": [ + "m002" + ] + }, + { + "id": "e_embeddings", + "name": "Local Embeddings", + "type": "Technology", + "properties": { + "provider": "sentence-transformers", + "model": "all-MiniLM-L6-v2" + }, + "scale": "component", + "extracted_from": [ + "m008", + "m011" + ] + }, + { + "id": "e_branch", + "name": "Feature Branch", + "type": "Concept", + "properties": { + "name": "claude/knowledge-graph-prototype-016woGkvRjndwTdvaeEGhz73" + }, + "scale": "atomic", + "extracted_from": [ + "m006" + ] + }, + { + "id": "e_isolation", + "name": "Agent Isolation", + "type": "Concept", + "properties": { + "importance": "high", + "reason": "prevent interference" + }, + "scale": "atomic", + "extracted_from": [ + "m005", + "m007" + ] + }, + { + "id": "e_task_embeddings", + "name": "Implement Local Embeddings", + "type": "Task", + "properties": { + "status": "in_progress", + "epic": "core_components" + }, + "scale": "atomic", + "extracted_from": [ + "m008" + ] + }, + { + "id": "e_task_demo", + "name": "Basic Demo", + "type": "Task", + "properties": { + "status": "in_progress", + "epic": "core_components" + }, + "scale": "atomic", + "extracted_from": [ + "m008" + ] + }, + { + "id": "e_adr006", + "name": "ADR-006: Leverage Client LLM", + "type": "Concept", + "properties": { + "decision": "use_client_llm", + "principle": "YAGNI" + }, + "scale": "atomic", + "extracted_from": [ + "m013" + ] + }, + { + "id": "e_pref_hierarchy", + "name": "Preference: Hierarchical Organization", + "type": "Preference", + "properties": { + "valued": "hierarchy, entities, relationships" + }, + "scale": "atomic", + "extracted_from": [ + "m009" + ] + }, + { + "id": "e_pref_wow", + "name": "Preference: WOW Factor", + "type": "Preference", + "properties": { + "valued": "impressive visualizations" + }, + "scale": "atomic", + "extracted_from": [ + "m010" + ] + } + ], + "relationships": [ + { + "source": "e_user", + "target": "e_memento", + "type": "WORKS_ON", + "properties": { + "role": "creator" + }, + "extracted_from": [ + "m001" + ] + }, + { + "source": "e_user", + "target": "e_isolation", + "type": "VALUES", + "properties": { + "priority": "high" + }, + "extracted_from": [ + "m007" + ] + }, + { + "source": "e_user", + "target": "e_pref_hierarchy", + "type": "HAS_PREFERENCE", + "properties": {}, + "extracted_from": [ + "m009" + ] + }, + { + "source": "e_user", + "target": "e_pref_wow", + "type": "HAS_PREFERENCE", + "properties": {}, + "extracted_from": [ + "m010" + ] + }, + { + "source": "e_memento", + "target": "e_ai_memory", + "type": "BELONGS_TO_DOMAIN", + "properties": {}, + "extracted_from": [ + "m002" + ] + }, + { + "source": "e_memento", + "target": "e_mcp", + "type": "IMPLEMENTS", + "properties": { + "role": "server" + }, + "extracted_from": [ + "m002" + ] + }, + { + "source": "e_memento", + "target": "e_fastmcp", + "type": "USES", + "properties": { + "purpose": "framework" + }, + "extracted_from": [ + "m003" + ] + }, + { + "source": "e_memento", + "target": "e_neo4j", + "type": "USES", + "properties": { + "purpose": "storage" + }, + "extracted_from": [ + "m004" + ] + }, + { + "source": "e_memento", + "target": "e_embeddings", + "type": "USES", + "properties": { + "purpose": "semantic_search" + }, + "extracted_from": [ + "m011" + ] + }, + { + "source": "e_neo4j", + "target": "e_embeddings", + "type": "STORES", + "properties": { + "data_type": "vector_embeddings" + }, + "extracted_from": [ + "m014" + ] + }, + { + "source": "e_adr006", + "target": "e_memento", + "type": "GUIDES", + "properties": { + "aspect": "architecture" + }, + "extracted_from": [ + "m013" + ] + }, + { + "source": "e_task_embeddings", + "target": "e_memento", + "type": "CONTRIBUTES_TO", + "properties": { + "phase": "1" + }, + "extracted_from": [ + "m008" + ] + }, + { + "source": "e_task_demo", + "target": "e_memento", + "type": "CONTRIBUTES_TO", + "properties": { + "phase": "1" + }, + "extracted_from": [ + "m008" + ] + }, + { + "source": "e_task_embeddings", + "target": "e_embeddings", + "type": "IMPLEMENTS", + "properties": {}, + "extracted_from": [ + "m008", + "m011" + ] + }, + { + "source": "e_branch", + "target": "e_isolation", + "type": "PROVIDES", + "properties": { + "mechanism": "git_branch" + }, + "extracted_from": [ + "m006", + "m007" + ] + }, + { + "source": "e_user", + "target": "e_branch", + "type": "WORKS_IN", + "properties": { + "environment": "cloud" + }, + "extracted_from": [ + "m005", + "m006" + ] + } + ], + "hierarchy": {}, + "statistics": { + "total_mementos": 15, + "total_entities": 14, + "total_relationships": 16, + "entities_by_type": { + "Person": 1, + "Concept": 4, + "Project": 1, + "Technology": 4, + "Task": 2, + "Preference": 2 + }, + "entities_by_scale": { + "domain": 2, + "system": 1, + "component": 4, + "atomic": 7 + } + } +} \ No newline at end of file diff --git a/prototype/kg-demo/graph.mmd b/prototype/kg-demo/graph.mmd new file mode 100644 index 0000000..8643c17 --- /dev/null +++ b/prototype/kg-demo/graph.mmd @@ -0,0 +1,58 @@ +graph TB + + %% === RAW MEMENTOS (Foundation Layer) === + %% DOMAIN SCALE + e_user["User"] + e_ai_memory["AI Memory Systems"] + + %% SYSTEM SCALE + e_memento["Memento Project"] + + %% COMPONENT SCALE + e_neo4j["Neo4j"] + e_fastmcp["FastMCP"] + e_mcp["Model Context Protocol"] + e_embeddings["Local Embeddings"] + + %% ATOMIC SCALE + e_branch["Feature Branch"] + e_isolation["Agent Isolation"] + e_task_embeddings["Implement Local Embeddings"] + e_task_demo["Basic Demo"] + e_adr006["ADR-006: Leverage Client LLM"] + e_pref_hierarchy["Preference: Hierarchical Organization"] + e_pref_wow["Preference: WOW Factor"] + + %% === RELATIONSHIPS === + e_user -->|WORKS ON| e_memento + e_user -->|VALUES| e_isolation + e_user -->|HAS PREFERENCE| e_pref_hierarchy + e_user -->|HAS PREFERENCE| e_pref_wow + e_memento -->|BELONGS TO DOMAIN| e_ai_memory + e_memento -->|IMPLEMENTS| e_mcp + e_memento -->|USES| e_fastmcp + e_memento -->|USES| e_neo4j + e_memento -->|USES| e_embeddings + e_neo4j -->|STORES| e_embeddings + e_adr006 -->|GUIDES| e_memento + e_task_embeddings -->|CONTRIBUTES TO| e_memento + e_task_demo -->|CONTRIBUTES TO| e_memento + e_task_embeddings -->|IMPLEMENTS| e_embeddings + e_branch -->|PROVIDES| e_isolation + e_user -->|WORKS IN| e_branch + + %% === STYLING === + style e_user fill:#e1f5fe + style e_ai_memory fill:#e8f5e9 + style e_memento fill:#f3e5f5 + style e_neo4j fill:#fff3e0 + style e_fastmcp fill:#fff3e0 + style e_mcp fill:#fff3e0 + style e_embeddings fill:#fff3e0 + style e_branch fill:#e8f5e9 + style e_isolation fill:#e8f5e9 + style e_task_embeddings fill:#fff9c4 + style e_task_demo fill:#fff9c4 + style e_adr006 fill:#e8f5e9 + style e_pref_hierarchy fill:#fce4ec + style e_pref_wow fill:#fce4ec \ No newline at end of file diff --git a/prototype/kg-demo/interactive_graph.html b/prototype/kg-demo/interactive_graph.html new file mode 100644 index 0000000..92942c0 --- /dev/null +++ b/prototype/kg-demo/interactive_graph.html @@ -0,0 +1,340 @@ + + +
+