# lumiel777/neuromapa architecture

> Architecture diagram of the GitHub repository lumiel777/neuromapa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lumiel777/neuromapa
- Repository: https://github.com/lumiel777/neuromapa

## Overview

Neuromapa reúne memorias de Claude Code y documentos elegidos en un grafo navegable, ofrece búsqueda y chequeos de vigencia, y aprende de la actividad para mejorar futuras pistas. El flujo principal va de los eventos y consultas de Claude al registro y procesamiento de memoria, y de allí a las recomendaciones y al mapa web en vivo. Se preservan también los chequeos de salud, las alertas y los conectores opcionales. Las relaciones se apoyan en el README y en referencias del SOURCE INDEX; varios módulos no fueron muestreados, así que se omiten vínculos internos no demostrados.

Main entry points: [`buscador.py`](https://github.com/lumiel777/neuromapa/blob/main/buscador.py) (Búsqueda y pistas), [`cerebro.py`](https://github.com/lumiel777/neuromapa/blob/main/cerebro.py) (Grafo de memoria), [`hook_evento.py`](https://github.com/lumiel777/neuromapa/blob/main/hook_evento.py) (Captura de eventos), [`aprender.py`](https://github.com/lumiel777/neuromapa/blob/main/aprender.py) (Aprendizaje)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_memory["Memoria y grafo"]
  node_config["Configuración<br/>[configuracion.py]"]
  node_sources["Fuentes de notas<br/>[archivos.py]"]
  node_brain["Grafo de memoria<br/>[cerebro.py]"]
  node_storage[("Archivos locales")]
end

subgraph group_insight["Búsqueda y salud"]
  node_search["Búsqueda y pistas<br/>[buscador.py]"]
  node_health["Médico de memoria<br/>[medico.py]"]
  node_organize["Orden de notas<br/>[ordenar.py]"]
end

subgraph group_activity["Actividad y aprendizaje"]
  node_events["Captura de eventos<br/>[hook_evento.py]"]
  node_serve_hook["Contexto automático<br/>[hook_servir.py]"]
  node_learning["Aprendizaje<br/>[aprender.py]"]
  node_learn_memory["Modelo aprendido"]
  node_learn_clues["Pistas aprendidas<br/>[aprender_pista.py]"]
  node_history["Historial y charlas<br/>[historial.py]"]
end

subgraph group_runtime["Integraciones"]
  node_server["Servidor del mapa<br/>[servidor.py]"]
  node_mcp["Conector MCP<br/>[conector_mcp.py]"]
  node_warnings["Avisos de actividad<br/>[choques.py]"]
end

subgraph group_interface["Mapa visual"]
  node_webmap["Mapa 3D en vivo<br/>[05-cerebro-3d.js]"]
  node_page_live["Vista de actividad<br/>[07-en-vivo.js]"]
end

node_claude(("Claude Code"))
node_desktop(("Claude Desktop"))
node_user(("Usuario"))

node_user -->|"consulta"| node_claude
node_claude -.->|"solicita contexto"| node_serve_hook
node_serve_hook -->|"obtiene pistas"| node_search
node_search -->|"consulta grafo"| node_brain
node_claude -->|"emite eventos"| node_events
node_events -.->|"registra actividad"| node_history
node_events -->|"alimenta aprendizaje"| node_learning
node_learning -->|"actualiza modelo"| node_learn_memory
node_learning -->|"actualiza pistas"| node_learn_clues
node_learn_clues -->|"enriquece pistas"| node_search
node_config -->|"define fuentes"| node_sources
node_sources -->|"reúne notas"| node_brain
node_brain -->|"lee y escribe"| node_storage
node_search -->|"recomienda notas"| node_claude
node_user -->|"pide chequeo"| node_health
node_health -->|"revisa memoria"| node_brain
node_user -.->|"ordena notas"| node_organize
node_claude -.->|"activa avisos"| node_warnings
node_user -->|"abre mapa"| node_server
node_server -->|"sirve mapa"| node_brain
node_server -->|"entrega interfaz"| node_webmap
node_server -->|"entrega actividad"| node_page_live
node_desktop -.->|"conecta opcionalmente"| node_mcp
node_mcp -.->|"expone notas"| node_search
node_events -->|"muestra actividad"| node_page_live
node_learning -->|"actualiza conexiones"| node_webmap

click node_config "https://github.com/lumiel777/neuromapa/blob/main/configuracion.py"
click node_sources "https://github.com/lumiel777/neuromapa/blob/main/archivos.py"
click node_brain "https://github.com/lumiel777/neuromapa/blob/main/cerebro.py"
click node_search "https://github.com/lumiel777/neuromapa/blob/main/buscador.py"
click node_health "https://github.com/lumiel777/neuromapa/blob/main/medico.py"
click node_organize "https://github.com/lumiel777/neuromapa/blob/main/ordenar.py"
click node_events "https://github.com/lumiel777/neuromapa/blob/main/hook_evento.py"
click node_serve_hook "https://github.com/lumiel777/neuromapa/blob/main/hook_servir.py"
click node_learning "https://github.com/lumiel777/neuromapa/blob/main/aprender.py"
click node_learn_memory "https://github.com/lumiel777/neuromapa/blob/main/aprender_memoria.py"
click node_learn_clues "https://github.com/lumiel777/neuromapa/blob/main/aprender_pista.py"
click node_history "https://github.com/lumiel777/neuromapa/blob/main/historial.py"
click node_server "https://github.com/lumiel777/neuromapa/blob/main/servidor.py"
click node_mcp "https://github.com/lumiel777/neuromapa/blob/main/conector_mcp.py"
click node_warnings "https://github.com/lumiel777/neuromapa/blob/main/choques.py"
click node_webmap "https://github.com/lumiel777/neuromapa/blob/main/pagina/05-cerebro-3d.js"
click node_page_live "https://github.com/lumiel777/neuromapa/blob/main/pagina/07-en-vivo.js"

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_config,node_sources,node_brain,node_storage toneBlue
class node_search,node_health,node_organize toneAmber
class node_events,node_serve_hook,node_learning,node_learn_memory,node_learn_clues,node_history toneMint
class node_server,node_mcp,node_warnings toneRose
class node_webmap,node_page_live,node_claude,node_desktop,node_user toneIndigo
```

## Components

### Memoria y grafo

- [Configuración](https://github.com/lumiel777/neuromapa/blob/main/configuracion.py): `configuracion.py`
- [Fuentes de notas](https://github.com/lumiel777/neuromapa/blob/main/archivos.py): `archivos.py`
- [Grafo de memoria](https://github.com/lumiel777/neuromapa/blob/main/cerebro.py): `cerebro.py`
- **Archivos locales**

### Búsqueda y salud

- [Búsqueda y pistas](https://github.com/lumiel777/neuromapa/blob/main/buscador.py): `buscador.py`
- [Médico de memoria](https://github.com/lumiel777/neuromapa/blob/main/medico.py): `medico.py`
- [Orden de notas](https://github.com/lumiel777/neuromapa/blob/main/ordenar.py): `ordenar.py`

### Actividad y aprendizaje

- [Captura de eventos](https://github.com/lumiel777/neuromapa/blob/main/hook_evento.py): `hook_evento.py`
- [Contexto automático](https://github.com/lumiel777/neuromapa/blob/main/hook_servir.py): `hook_servir.py`
- [Aprendizaje](https://github.com/lumiel777/neuromapa/blob/main/aprender.py): `aprender.py`
- [Modelo aprendido](https://github.com/lumiel777/neuromapa/blob/main/aprender_memoria.py): `aprender_memoria.py`
- [Pistas aprendidas](https://github.com/lumiel777/neuromapa/blob/main/aprender_pista.py): `aprender_pista.py`
- [Historial y charlas](https://github.com/lumiel777/neuromapa/blob/main/historial.py): `historial.py`

### Integraciones

- [Servidor del mapa](https://github.com/lumiel777/neuromapa/blob/main/servidor.py): `servidor.py`
- [Conector MCP](https://github.com/lumiel777/neuromapa/blob/main/conector_mcp.py): `conector_mcp.py`
- [Avisos de actividad](https://github.com/lumiel777/neuromapa/blob/main/choques.py): `choques.py`

### Mapa visual

- [Mapa 3D en vivo](https://github.com/lumiel777/neuromapa/blob/main/pagina/05-cerebro-3d.js): `pagina/05-cerebro-3d.js`
- [Vista de actividad](https://github.com/lumiel777/neuromapa/blob/main/pagina/07-en-vivo.js): `pagina/07-en-vivo.js`

### Other components

- **Claude Code**
- **Claude Desktop**
- **Usuario**

## Connections

- Usuario → Claude Code: consulta
- Claude Code → Contexto automático: solicita contexto
- Contexto automático → Búsqueda y pistas: obtiene pistas (evidence: `hook_servir.py`)
- Búsqueda y pistas → Grafo de memoria: consulta grafo (evidence: `buscador.py`)
- Claude Code → Captura de eventos: emite eventos
- Captura de eventos → Historial y charlas: registra actividad
- Captura de eventos → Aprendizaje: alimenta aprendizaje (evidence: `hook_evento.py`)
- Aprendizaje → Modelo aprendido: actualiza modelo (evidence: `aprender.py`)
- Aprendizaje → Pistas aprendidas: actualiza pistas (evidence: `aprender.py`)
- Pistas aprendidas → Búsqueda y pistas: enriquece pistas (evidence: `buscador.py`)
- Configuración → Fuentes de notas: define fuentes (evidence: `configuracion.py`)
- Fuentes de notas → Grafo de memoria: reúne notas (evidence: `cerebro.py`)
- Grafo de memoria → Archivos locales: lee y escribe
- Búsqueda y pistas → Claude Code: recomienda notas
- Usuario → Médico de memoria: pide chequeo
- Médico de memoria → Grafo de memoria: revisa memoria (evidence: `medico.py`)
- Usuario → Orden de notas: ordena notas
- Claude Code → Avisos de actividad: activa avisos
- Usuario → Servidor del mapa: abre mapa
- Servidor del mapa → Grafo de memoria: sirve mapa (evidence: `servidor.py`)
- Servidor del mapa → Mapa 3D en vivo: entrega interfaz
- Servidor del mapa → Vista de actividad: entrega actividad
- Claude Desktop → Conector MCP: conecta opcionalmente
- Conector MCP → Búsqueda y pistas: expone notas
- Captura de eventos → Vista de actividad: muestra actividad
- Aprendizaje → Mapa 3D en vivo: actualiza conexiones
