# samueljacksongrim/resonance-journal-blind architecture

> Architecture diagram of the GitHub repository samueljacksongrim/resonance-journal-blind, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samueljacksongrim/resonance-journal-blind
- Repository: https://github.com/samueljacksongrim/resonance-journal-blind

## Overview

Resonance is a local weighted semantic-memory library with CLI and MCP interfaces. Users add notes and asserted word relations; the system normalizes text, stores notes and learned co-occurrences in SQLite, then follows weighted links to rank related terms and notes or produce prompt-ready context. The graph includes the documented import/export, deletion, and maintenance capabilities under the memory API. Edges are limited to calls or relationships visible in excerpts or the README; unsampled CLI and memory internals are not inferred.

Main entry points: [`resonance/memory.py`](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/memory.py) (Memory API), [`resonance/store.py`](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/store.py) (SQLite store), [`resonance/recall.py`](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/recall.py) (Recall and neighbors), [`resonance/cli.py`](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/cli.py) (Command-line interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["Command-line interface<br/>[cli.py]"]
  node_mcp["MCP stdio server<br/>[mcp_server.py]"]
end

subgraph group_memory["Memory operations"]
  node_memory_api["Memory API<br/>[memory.py]"]
end

subgraph group_analysis["Text and retrieval"]
  node_text_analysis["Text normalization and analysis<br/>[text.py]"]
  node_recall["Recall and neighbors<br/>[recall.py]"]
  node_weights["Relationship weights<br/>[weights.py]"]
end

subgraph group_persistence["Persistence"]
  node_store[("SQLite store<br/>[store.py]")]
end

node_operator(("Operator"))
node_ai_client(("AI client"))

node_operator -->|"runs commands"| node_cli
node_ai_client -->|"uses tools"| node_mcp
node_cli -->|"invokes operations"| node_memory_api
node_mcp -->|"dispatches tools"| node_memory_api
node_memory_api -->|"analyzes text"| node_text_analysis
node_memory_api -->|"requests retrieval"| node_recall
node_memory_api -->|"reads and writes"| node_store
node_recall -->|"queries data"| node_store
node_recall -->|"uses calculations"| node_weights
node_store -->|"persists in SQLite"| node_store

click node_cli "https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/cli.py"
click node_mcp "https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/mcp_server.py"
click node_memory_api "https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/memory.py"
click node_text_analysis "https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/text.py"
click node_recall "https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/recall.py"
click node_weights "https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/weights.py"
click node_store "https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/store.py"

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_cli,node_mcp,node_ai_client toneBlue
class node_memory_api toneAmber
class node_text_analysis,node_recall,node_weights toneMint
class node_store toneRose
class node_operator toneIndigo
```

## Components

### User interfaces

- [Command-line interface](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/cli.py): `resonance/cli.py`
- [MCP stdio server](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/mcp_server.py): `resonance/mcp_server.py`

### Memory operations

- [Memory API](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/memory.py): `resonance/memory.py`

### Text and retrieval

- [Text normalization and analysis](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/text.py): `resonance/text.py`
- [Recall and neighbors](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/recall.py): `resonance/recall.py`
- [Relationship weights](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/weights.py): `resonance/weights.py`

### Persistence

- [SQLite store](https://github.com/samueljacksongrim/resonance-journal-blind/blob/master/resonance/store.py): `resonance/store.py`

### Other components

- **Operator**
- **AI client**

## Connections

- Operator → Command-line interface: runs commands (evidence: `README.md`)
- AI client → MCP stdio server: uses tools (evidence: `README.md`)
- Command-line interface → Memory API: invokes operations (evidence: `resonance/cli.py`)
- MCP stdio server → Memory API: dispatches tools (evidence: `resonance/mcp_server.py`)
- Memory API → Text normalization and analysis: analyzes text (evidence: `resonance/memory.py`)
- Memory API → Recall and neighbors: requests retrieval (evidence: `resonance/memory.py`)
- Memory API → SQLite store: reads and writes (evidence: `resonance/memory.py`)
- Recall and neighbors → SQLite store: queries data (evidence: `resonance/recall.py`)
- Recall and neighbors → Relationship weights: uses calculations (evidence: `resonance/recall.py`)
- SQLite store → SQLite store: persists in SQLite (evidence: `resonance/store.py`)
