# syncable-dev/memtrace-public architecture

> Architecture diagram of the GitHub repository syncable-dev/memtrace-public, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/syncable-dev/memtrace-public
- Repository: https://github.com/syncable-dev/memtrace-public

## Overview

Memtrace is a local structural-memory and code-intelligence product for coding agents. Its principal workflow is to index a workspace into a knowledge graph, then expose graph and source-context queries to agents; temporal history supports impact and evolution analysis. The README also documents cross-service API topology, LeanCTX compression, and code-review capabilities. The supplied tree contains no runtime implementation files and no source excerpts, so component paths and internal call relationships cannot be verified; documented relationships are cited to the README only.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_indexing["Indexing"]
  node_indexer["Code Indexer"]
  node_language_parsers["Language Parsers"]
  node_framework_scanners["Framework Scanners"]
end

subgraph group_intelligence["Graph Intelligence"]
  node_knowledge_graph[("Knowledge Graph")]
  node_graph_queries["Graph Queries"]
  node_temporal_analysis["Temporal Analysis"]
  node_api_topology["API Topology"]
  node_community_detection["Community Detection"]
end

subgraph group_agent_access["Agent Access"]
  node_mcp["MCP Interface"]
  node_cli["CLI"]
end

subgraph group_memory_context["Memory and Context"]
  node_source_context["Source Context"]
  node_leanctx["LeanCTX"]
  node_code_review["Code Review"]
end

node_developer(("Developer"))
node_workspace["Code Workspace"]
node_agent(("Coding Agent"))
node_service_repositories["Service Repositories"]

node_developer -->|"runs"| node_cli
node_cli -->|"indexes"| node_workspace
node_indexer -->|"reads"| node_workspace
node_indexer -->|"parses with"| node_language_parsers
node_indexer -->|"scans with"| node_framework_scanners
node_indexer -->|"builds"| node_knowledge_graph
node_agent -->|"queries through"| node_mcp
node_mcp -->|"exposes"| node_graph_queries
node_graph_queries -->|"queries"| node_knowledge_graph
node_graph_queries -->|"provides"| node_source_context
node_agent -->|"requests"| node_temporal_analysis
node_temporal_analysis -->|"queries history"| node_knowledge_graph
node_agent -->|"requests"| node_api_topology
node_api_topology -->|"maps calls across"| node_service_repositories
node_knowledge_graph -->|"supports"| node_community_detection
node_agent -->|"requests"| node_leanctx
node_leanctx -->|"compresses"| node_source_context
node_agent -->|"uses"| node_code_review

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_indexer,node_language_parsers,node_framework_scanners toneBlue
class node_knowledge_graph,node_graph_queries,node_temporal_analysis,node_api_topology,node_community_detection toneAmber
class node_mcp,node_cli toneMint
class node_source_context,node_leanctx,node_code_review toneRose
class node_developer,node_workspace,node_agent,node_service_repositories toneIndigo
```

## Components

### Indexing

- **Code Indexer**
- **Language Parsers**
- **Framework Scanners**

### Graph Intelligence

- **Knowledge Graph**
- **Graph Queries**
- **Temporal Analysis**
- **API Topology**
- **Community Detection**

### Agent Access

- **MCP Interface**
- **CLI**

### Memory and Context

- **Source Context**
- **LeanCTX**
- **Code Review**

### Other components

- **Developer**
- **Code Workspace**
- **Coding Agent**
- **Service Repositories**

## Connections

- Developer → CLI: runs (evidence: `README.md`)
- CLI → Code Workspace: indexes (evidence: `README.md`)
- Code Indexer → Code Workspace: reads (evidence: `README.md`)
- Code Indexer → Language Parsers: parses with (evidence: `README.md`)
- Code Indexer → Framework Scanners: scans with (evidence: `README.md`)
- Code Indexer → Knowledge Graph: builds (evidence: `README.md`)
- Coding Agent → MCP Interface: queries through (evidence: `README.md`)
- MCP Interface → Graph Queries: exposes (evidence: `README.md`)
- Graph Queries → Knowledge Graph: queries (evidence: `README.md`)
- Graph Queries → Source Context: provides (evidence: `README.md`)
- Coding Agent → Temporal Analysis: requests (evidence: `README.md`)
- Temporal Analysis → Knowledge Graph: queries history (evidence: `README.md`)
- Coding Agent → API Topology: requests (evidence: `README.md`)
- API Topology → Service Repositories: maps calls across (evidence: `README.md`)
- Knowledge Graph → Community Detection: supports (evidence: `README.md`)
- Coding Agent → LeanCTX: requests (evidence: `README.md`)
- LeanCTX → Source Context: compresses (evidence: `README.md`)
- Coding Agent → Code Review: uses (evidence: `README.md`)
