NEXUS MEMORY SYSTEM · v2.0

PARA + Ontology + QMD

Integration Architecture
Data enters through PARA → Gets Ontology types → Indexed by QMD
01 — System Overview

Unified Architecture

INPUT SOURCES 💬 Chat 📄 Documents 🔗 URLs / APIs PARA TRIAGE PROJECTS 1_Projects/ AREAS 2_Areas/ RESOURCES 3_Resources/ ARCHIVE 4_Archive/ ONTOLOGY Project entity Decision entity Task entity Lesson entity QMD MULTI-MODAL INDEXING Qdrant Semantic / Vectors 1024-dim · cosine localhost:6333 BM25 Keyword / Full-text Exact matches Boost: title > content Ontology Graph Relationship traversal BFS / DFS edges affects · part_of · blocked_by Unified Search API modes: hybrid · semantic · keyword · graph filters: para · entity_type · date_range NEXUS MEMORY SYSTEM — QMD ARCHITECTURE
4
PARA Categories
6
Entity Types
3
Index Layers
1024
Vector Dims
4
Search Modes
Relationships
02 — Organization

PARA Structure

📂

1_Projects/

Active, goal-oriented initiatives with deadlines and specific outcomes. The fire of the system.

Goals Decisions Timelines Blockers
⚙️

2_Areas/

Ongoing responsibilities without end dates. Long-term maintenance, recurring duties, domain ownership.

SOPs Patterns Configs Agents
📚

3_Resources/

Reference materials and topical knowledge. Information retained but not actively being worked on.

Docs Research Templates Code
📦

4_Archive/

Completed or inactive items. No longer relevant but preserved for historical context and audits.

Post-mortems Old configs History

PARA → Collection Mapping

  • para-projects1_Projects/
  • para-areas2_Areas/
  • para-resources3_Resources/
  • para-archives4_Archive/

Triage Rules

  • Has deadline?→ Projects
  • Ongoing duty?→ Areas
  • Reference only?→ Resources
  • Done / inactive?→ Archive
03 — Entity Model

Ontology Integration

Entity Key Attributes Relationships PARA Mapping
Project name, status, dates, success_criteria has_task, depends_on, owned_by Projects
Decision description, rationale, alternatives, outcome affects, supersedes, contested_by Projects
Task description, status, priority, due_date part_of, blocked_by, assigned_to Projects
Person name, role, contact_info, capabilities works_on, manages, collaborates_with Areas
Agent name, role, capabilities, status, memory specializes_in, reports_to, delegates_to Areas
Lesson context, what_happened, why, what_to_do learned_from, applies_to, related_to Resources

💡 Relationship Queries

Natural language queries answered via graph traversal:

"What decisions affected the website project?"
"What blockers is Shadow currently handling?"
"What lessons apply to system administration?"
"What tasks depend on this decision?"
04 — Indexing

QMD Multi-Modal Search

🧠 Qdrant — Semantic Layer

2560-dimensional vectors from Qwen3-4B. Cosine similarity search finds conceptually related content even when keywords don't match.

1024 dims Cosine sim localhost:6333

📝 BM25 — Keyword Layer

Full-text index on content and metadata. Title matches boosted 3× over body. Exact phrase matching and boolean operators.

Full-text Title boost Boolean ops

🕸️ Ontology Graph — Relationship Layer

Entity relationships stored as typed edges. Supports BFS/DFS traversal. Answers "what depends on this" and "what does this affect" queries.

Typed edges BFS / DFS Cascade

🔀 Unified Search API

Modes:

hybrid semantic keyword graph

Filters:

para_category entity_type date_range agent_id
// Unified search across all three layers search("blockers on the website project", { mode: "hybrid", filters: { para_category: "projects", entity_type: "task" }, topK: 5, threshold: 0.72 }) [ { source: "qdrant", score: 0.94, content: "..." }, { source: "bm25", score: 0.89, content: "..." }, { source: "graph", score: 0.85, content: "..." } ]
05 — Process

Approval Workflow

01
📥 Input Received

Any source — chat message, document, decision, URL. Captured by front-desk agent (GWEN).

02
📂 PARA Triage

System suggests PARA location based on content type, urgency, and time horizon. User confirms or redirects.

03
🔗 Ontology Assignment

System proposes entity types and relationship candidates. Edges created: affects, part_of, blocked_by, etc.

04
🔍 Multi-Modal Index

Content written to file (authoritative source), then indexed in three layers: Qdrant vector, BM25 full-text, and ontology graph edges.

# Example: Ingesting a decision ingest({ content: "Migrate database to PostgreSQL before Q2", para_category: "projects", entity_type: "decision", relationships: [ { type: "affects", target: "infrastructure-project" }, { type: "owned_by", target: "hermes" } ] }) Stored + Qdrant + BM25 + Graph edges created
06 — Resilience

Disaster Recovery

🚨 If Qdrant Dies

Vector index is derived data. Rebuild from authoritative PARA files on disk — no data is lost.

# Rebuild all indices from PARA files python3 scripts/rebuild-from-para.py --all # Steps: # 1. Walk 1_Projects/, 2_Areas/, 3_Resources/, 4_Archive/ # 2. Regenerate embeddings via Qwen3-4B # 3. Rebuild BM25 index from file content # 4. Reconstruct ontology graph edges

💾 If Files Lost

Qdrant and BM25 store the content payload. Restore files from backup, then re-hydrate metadata.

# Restore from backup tar -xzf safe_2026-03-08.tar.gz # Re-hydrate file metadata from vector store python3 scripts/restore-metadata.py --from-qdrant # Rebuild indices after restore python3 scripts/rebuild-from-para.py --all

🛡️ Data Hierarchy

📁
Files (Source of Truth)
🧠
Qdrant Vectors
📝
BM25 Index
🕸️
Ontology Graph

Files are primary. Indices are derived. Recovery always starts from disk.

07 — Benefits

Advantages

🏗️ Structured from Entry

No raw dumps. Everything categorized immediately into PARA. No orphaned, unorganized data ever enters the system.

🔄 Three Search Modes

Semantic (meaning), keyword (exact match), and graph (relationships). One query, three complementary retrieval paths.

🕸️ Relationship-Aware

Ask "what does this affect?" or "what depends on this?" The ontology graph answers dependency questions that vectors cannot.

📂 PARA-Native

PARA categories are first-class citizens. Filtering by active project vs archived reference is native, not bolted on.

🔄 Reproducible

Every index can be rebuilt from PARA files. Complete audit trail of decisions, their rationale, and their cascading impacts.

📈 Self-Improving

Every search refines embeddings. Every correction improves ontology. The system gets smarter with each interaction.

⚡ Next Step

Implement PARA-structured ingestion workflow with automatic ontology typing and multi-modal indexing in the Nexus pipeline.

Implement Ingest Pipeline Add Graph Traversal UI Write rebuild scripts