# Knowledge Systems Architecture

> **Historical snapshot (2026-03-04).** This audit was a point-in-time map of all knowledge systems as of early March 2026. It has since been overtaken by significant changes: NanoClaw replaced OpenClaw as the active gateway, the `/intake/structured` endpoint went live, the bookmark-extractor sprite was deprecated, and the Amplifier bundle system matured to 18+ tool modules with talk-building, people enrichment, and design intelligence capabilities not reflected here. Read this as historical context showing how the system was shaped, not as a current operations map.

> Comprehensive view of all knowledge extraction, storage, and retrieval systems.
> Created 2026-03-04 from full audit of jibot-docs, jibot-code, switchboard, amplifier, nanoclaw, and scattered design docs.

## Status: Historical Reference

This document provides a navigational map across all knowledge systems as they existed in early 2026. It does NOT replace the canonical documents it references -- it connects them.

**Canonical sources** (edit THESE for changes):
- Agent system: `jibot-docs/design/jibot-unified-architecture.md`
- NanoClaw migration: `jibot-docs/design/2026-02-23-nanoclaw-migration-plan.md`
- Knowledge pipeline: `amplifier/JIBRAIN-ARCHITECTURE.md`
- Graph philosophy: `amplifier/KNOWLEDGE-GRAPH-REDESIGN.md`
- Extraction config: `amplifier/MULTI-DOMAIN-EXTRACTION.md`
- Vault conventions: `jibrain/_STRUCTURE.md`

---

## 1. System Map

```
┌─────────────────────────────────────────────────────────────────────────────┐
│                        KNOWLEDGE INPUT LAYER                               │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  WhatsApp/Signal ────► agent gateway ────► bookmark-relay ───┐             │
│  Telegram ────────────► jimindbot (Ethoswarm Mind) ──────────┤             │
│  CLI ─────────────────► bookmark-intake.sh ──────────────────┤             │
│                                                               │             │
│                                                               ▼             │
│                                              ┌──────────────────────────┐   │
│                                              │ bookmark-extractor       │   │
│  PDF books ──► extract_book_chunked.py       │ sprite (FastAPI)         │   │
│  (Gemini vision)                             │ sprites.app              │   │
│                                              └──────────┬───────────────┘   │
│  Japanese docs ──► knowledge-extract/                   │                   │
│  (column-aware OCR)                                     │                   │
│                                                         │                   │
│  Daily notes ──► [!jibrain] callouts ──► meeting-extract│                   │
│  Muesli transcripts ──► meeting-extract recipe          │                   │
│                                                         │                   │
└─────────────────────────────────────────────────────────┼───────────────────┘
                                                          │
                                                          ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│                    KNOWLEDGE STORAGE LAYER                                  │
│                    Obsidian vault                                           │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  jibrain/                          ◄── "Obsidian IS the graph"             │
│    intake/          ◄── ALL new knowledge lands here (status: draft)       │
│      .meta/         ◄── JSON sidecar metadata                              │
│      .observations/ ◄── Agent friction signals                             │
│    atlas/           ◄── Promoted permanent knowledge (status: final)       │
│      concepts/                                                             │
│      organizations/                                                        │
│      people/                                                               │
│      references/                                                           │
│    domains/         ◄── Graduated deep-knowledge areas                     │
│      chanoyu/       (exemplar: 19+ concepts, seasonal guides, vocab)       │
│      ai-coding/     (agent patterns)                                       │
│      poc-thebook/   (synced from git)                                      │
│    _review/         ◄── Staging for human review                           │
│                                                                             │
│  agents/                                                                    │
│    extractions/  ◄── Knowledge extraction pipeline output        │
│    writer/drafts/        ◄── Talk/presentation drafts                      │
│    analyst/reports/      ◄── Analysis outputs                              │
│    research/findings/    ◄── Research agent outputs                        │
│    _shared/              ◄── Cross-agent handoffs                          │
│                                                                             │
│  concepts/          (30+ files, read directly by community bot)            │
│  organizations/     (read directly by community bot)                       │
│  people/            (880+ pages, PRIVATE, never synced)                    │
│  chanoyu/           (curated export to shared repo)                        │
│  dailynote/         (PRIVATE, never synced)                                │
│  tools/knowledge-extract/  (Japanese OCR pipeline)                         │
│                                                                             │
└─────────────────────────────────────────────┬───────────────────────────────┘
                                              │
                         ┌────────────────────┼────────────────────┐
                         │ selective export    │ QMD indexing       │
                         ▼                    ▼                    │
┌───────────────────────────────────┐  ┌─────────────────────────────────┐  │
│ Shared knowledge repo (git)      │  │ QMD Search (MCP server)         │  │
│ ► chanoyu/ (curated)             │  │ 4,322 documents indexed:        │  │
│ ► concepts/ (planned)            │  │  - jibrain: 2,427 docs          │  │
│ ► organizations/ (planned)       │  │  - dailynote: 1,012 docs        │  │
│ ► people-public/ (planned)       │  │  - people: 883 docs             │  │
│ ► design/ (architecture docs)    │  │                                 │  │
│ ► inbox/outbox (async tasks)     │  │ Modes: keyword (BM25),          │  │
│                                  │  │ vector (semantic), deep          │  │
│ git sync → agent machine         │  │ (hybrid + LLM rerank)           │  │
└──────────────────────────────────┘  └─────────────────────────────────┘  │
                                                                           │
┌──────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│                      AGENT RUNTIME LAYER                                    │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  Joi's Laptop (Amplifier)                                                  │
│  ├── Amplifier sessions (Claude/OpenAI)                                    │
│  │   ├── QMD search (vault_search, mcp_qmd_*)                             │
│  │   ├── vault operations (graph_health, enrichment)                       │
│  │   ├── jibrain recipes (triage, meeting-extract, reweave)                │
│  │   └── knowledge_synthesis module (Claude/Gemini extraction)             │
│  │                                                                         │
│  └── jibot-3 (TypeScript, NOT RUNNING)                                     │
│      └── Reads concepts/ and organizations/ directories directly           │
│                                                                             │
│  Dedicated Agent Machine                                                   │
│  ├── NanoClaw gateway (CURRENT)                                            │
│  │   ├── Claude Agent SDK (Sonnet for owner, Haiku for assistant)          │
│  │   ├── Signal, Telegram, Slack, WhatsApp channels live                   │
│  │   ├── Per-group Docker containers with file-based IPC                   │
│  │   ├── Per-group CLAUDE.md memory files                                  │
│  │   └── jibrain intake hook wired into onMessage callback                 │
│  │                                                                         │
│  ├── signal-cli daemon (standalone, preserved identity)                    │
│  ├── Voice bridge (iOS → OpenAI Realtime, deferred)                        │
│  └── Shared knowledge repo (synced from GitHub)                            │
│                                                                             │
│  Ethoswarm (cloud)                                                         │
│  ├── jimindbot Mind (Switchboard Curator)                                  │
│  │   └── Telegram → classify → POST /intake/structured → sprite            │
│  └── amind.ai (email/messaging identity layer)                             │
│                                                                             │
│  Sprites (sprites.app, containerized)                                      │
│  ├── bookmark-extractor (FastAPI + Claude Sonnet) [DEPRECATED]             │
│  └── meeting-prep (exists, not fully documented)                           │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
```

---

## 2. Knowledge Pipeline Lifecycle

### Stage 1: Intake
Everything enters via `jibrain/intake/` with `status: draft`.

| Source | Path | Automation Level |
|--------|------|------------------|
| WhatsApp URL paste | agent → relay → knowledge intake pipeline | Fully automated |
| CLI bookmark | `bookmark-intake.sh` → intake | Manual trigger |
| Telegram | jimindbot (Ethoswarm) → /intake/structured → intake | Fully automated |
| Daily note callouts | `[!jibrain]` → meeting-extract recipe | Recipe-triggered |
| Meeting transcripts | muesli/ → meeting-extract recipe | Recipe-triggered |
| PDF books | `extract_book_chunked.py` (Gemini vision) | Manual trigger |
| Japanese historical docs | `knowledge-extract/` pipeline | Manual trigger |
| Manual annotation | Direct write with frontmatter | Manual |

### Stage 2: Triage
Recipe scans intake, cross-references existing vault, generates `_review/pending.md`.

### Stage 3: Promote
Human review → items move to `atlas/` with `status: final`.

### Stage 4: Reweave
Backward pass connects new knowledge to existing notes (jibrain-reweave recipe).

### Stage 5: Domain Graduation
When a topic accumulates 15+ files with distinct vocabulary, it graduates from `atlas/` to `domains/` (modeled after `chanoyu/`).

---

## 3. Retrieval Systems

### QMD Search (Primary for Amplifier sessions)
- **What**: Local semantic + keyword search engine (BM25 + vector + LLM rerank)
- **Indexed**: 4,322 docs (jibrain: 2,427, dailynote: 1,012, people: 883)
- **NOT indexed**: concepts/, organizations/, chanoyu/, agents/, tools/
- **Access**: MCP server with 6 tools (search, vector_search, deep_search, get, multi_get, status)
- **Models**: All local (~2GB GGUF: embeddinggemma-300M, qwen3-reranker, qmd-query-expansion)

### Vault Operations (Amplifier tool)
- **What**: Graph analysis, orphan detection, enrichment, tagging
- **Operations**: graph_health, domain_health, people_search, chanoyu_search, knowledge_health
- **Access**: `vault()` tool in Amplifier sessions

### knowledge_synthesis Module (Python, extraction-focused)
- **What**: Claude/Gemini-powered concept extraction from articles and books
- **Output**: Per-file JSON + consolidated JSONL stream
- **Downstream**: `knowledge/` module builds NetworkX graph on top (3,587 nodes, 15,018 edges)

### jibot-3 Direct Read (NOT RUNNING)
- **What**: TypeScript bot reads concepts/ and organizations/ directories directly
- **Access**: Slack commands (`explain <concept>`, `what is <org>`)

### Agent Machine Agents (via shared knowledge repo)
- **What**: NanoClaw agents read curated content from the shared knowledge repo
- **Limitation**: Only sees what's been exported via the chanoyu pattern

---

## 4. Sync Topology

```
Joi's Laptop (source of truth)
  Vault          ──► Syncthing ──► Agent machine (subset)
  Shared repo    ──► GitHub    ──► Agent machine (periodic git pull)

Sprites (bookmark-extractor)
  Writes to vault agents/extractions/
  ──► Syncthing distributes back to all machines

jibrain partition specifically:
  vault/jibrain/ ──► Syncthing ──► all machines (non-private)
```

**Security boundary**: The vault is the private store. Only curated subsets (chanoyu/, concepts/, organizations/, people-public/) are exported to the shared repo. Daily notes, private people notes, health/financial data NEVER leave the laptop.

---

## 5. Component Inventory

### Active and Maintained

| Component | Description | Status |
|-----------|-------------|--------|
| jibrain pipeline | Obsidian markdown knowledge pipeline | Active, growing |
| QMD search | Local MCP semantic search (Rust/Go) | Active, 4,322 docs indexed |
| NanoClaw | Agent gateway ([github.com/qwibitai/nanoclaw](https://github.com/qwibitai/nanoclaw), Joi uses a fork) | **Active, current gateway** |
| knowledge_synthesis | Python extraction engine (Claude/Gemini) | Active, primary extraction engine |
| knowledge (graph) | Python NetworkX graph layer | Active, downstream of synthesis |
| vault operations | Amplifier tool-vault module | Active |
| jibrain recipes | Amplifier recipes (triage, meeting-extract, reweave) | Active |
| signal-cli | Standalone messaging daemon (Java) | Active |
| jimindbot (Ethoswarm) | Cloud-based intake agent (Ethoswarm platform) | Provisioned, testing |
| knowledge intake pipeline | Federated knowledge extraction and intake | Active |
| Syncthing | Cross-machine file sync (Go) | Active |
| Agent machine heartbeat | Monitoring script (launchd) | Active |

### Planned / Not Yet Deployed

| Component | Status |
|-----------|--------|
| Switchboard sharing (concepts, orgs, people-public to shared repo) | Designed, not implemented |
| Amplifier bridge (GTD data → agent machine) | Design exists, not started |
| Proactive agent (morning briefing) | Designed, not started |
| Voice bridge NanoClaw integration | Deferred |

### Deprecated or Archived

| Component | Why |
|-----------|-----|
| OpenClaw gateway | Replaced by NanoClaw (migration completed 2026-03) |
| bookmark-extractor sprite | Deprecated; extraction handled through other pipelines |
| knowledge_mining module | Superseded by knowledge_synthesis; Makefile target deprecated |
| knowledge_integration module | Never completed; over-complex unified approach |
| jibot-3 | Installed but NOT RUNNING; unclear if it will be reactivated |

---

## 6. Integration Matrix

Which systems know about each other?

| System A | System B | Integration | Status |
|----------|----------|-------------|--------|
| WhatsApp | knowledge intake pipeline | via agent relay | Working |
| Telegram | knowledge intake pipeline | via jimindbot (Ethoswarm) | Testing |
| knowledge intake pipeline | jibrain/intake | Writes vault markdown via Syncthing | Working |
| QMD | vault | Indexes jibrain, dailynote, people | Working |
| QMD | concepts/, organizations/, chanoyu/ | NOT indexed | Gap |
| Amplifier | QMD | MCP server tools (search, deep_search) | Working |
| Amplifier | vault operations | tool-vault module | Working |
| Amplifier | jibrain recipes | triage, meeting-extract, reweave | Working |
| Amplifier | knowledge_synthesis | Python module, CLI | Working |
| knowledge_synthesis | knowledge (graph) | Reads extractions.jsonl | Working |
| jibot-3 | vault | Reads concepts/ and organizations/ directly | NOT RUNNING |
| NanoClaw | shared repo | Reads curated exports via git sync | Working |
| Amplifier GTD | agent machine agents | NO integration (key gap) | Gap |
| jibrain | talk writing | Writer agent drafts exist, no pipeline | Gap |
| knowledge_synthesis | jibrain | No automated flow between them | Gap |
| QMD | agent machine agents | No access from agent machine | Gap |

---

## 7. Data Flow Gaps (Critical)

### Gap 1: QMD indexing is incomplete
QMD indexes only 3 of 55+ vault directories: jibrain, dailynote, people. Missing: concepts/, organizations/, chanoyu/, agents/, Literature/, references/. This means semantic search can't find curated domain knowledge.

### Gap 2: No Amplifier → agent machine bridge
GTD data (Apple Reminders, beads issues, daily focus) lives on Joi's laptop. Agent machine agents can't access it. The proactive agent (morning briefing, nudges) requires this bridge. Three designs exist (daily snapshot, REST API, hybrid) but none are built.

### Gap 3: knowledge_synthesis output doesn't flow to jibrain
The Python extraction engine produces JSONL and per-file JSON. This data isn't automatically promoted into jibrain/intake/. The two systems operate independently.

### Gap 4: Book ingestion → jibrain path not connected
PDF extraction via Gemini works. Output goes to source-specific directories. But there's no automated path from extracted book content → jibrain/intake/ for triage and atlas promotion.

### Gap 5: Talk/presentation writing pipeline is manual
Writer agent drafts exist. Amplifier has blog_writer and blog_synthesize scenarios. But there's no connected pipeline from jibrain knowledge → talk outline → draft → review.

### Gap 6: Switchboard sharing not implemented
The "chanoyu pattern" for exporting concepts/, organizations/, and people-public/ to the shared repo is designed but not built. Agent machine agents only see chanoyu/.

---

## 8. Python Module Status

```
amplifier/
├── knowledge_synthesis/   ◄── PRIMARY: Claude/Gemini extraction, multi-domain
│   ├── 23 files, actively maintained
│   ├── CLI: make knowledge-sync / knowledge-gemini-*
│   └── Output: .data/extractions/*.json + .data/knowledge/extractions.jsonl
│
├── knowledge/             ◄── SECONDARY: NetworkX graph layer
│   ├── 8 files (graph_builder, graph_search, tension_detector, visualizer)
│   ├── CLI: make knowledge-graph-*
│   ├── Reads extractions.jsonl from knowledge_synthesis
│   └── Stats: 3,587 nodes, 15,018 edges, 49 tensions
│
├── knowledge_mining/      ◄── ABANDONED (Dec 2024, never updated)
│   ├── Makefile target explicitly deprecated
│   ├── Uses NetworkX as storage (rejected approach)
│   └── RECOMMENDATION: Archive or delete
│
└── knowledge_integration/ ◄── ABANDONED (Dec 2024, never completed)
    ├── No README, no Makefile targets
    ├── Over-complex unified approach, never reached usable state
    └── RECOMMENDATION: Archive or delete
```

---

## 9. Design Doc Registry

### Knowledge System Docs

| Document | Location | Status |
|----------|----------|--------|
| jibrain Architecture | amplifier/JIBRAIN-ARCHITECTURE.md | **Canonical** |
| Knowledge Graph Redesign | amplifier/KNOWLEDGE-GRAPH-REDESIGN.md | **Active** |
| Multi-Domain Extraction | amplifier/MULTI-DOMAIN-EXTRACTION.md | **Active** |
| Obsidian CLI Integration | amplifier/OBSIDIAN-CLI-INTEGRATION.md | **Active** |
| Future Knowledge Vaults | amplifier/FUTURE-KNOWLEDGE-VAULTS-PLAN.md | **Proposal** |
| jibrain Conventions Skill | Amplifier skills/jibrain-conventions/ | **Active** |
| Vault Structure | jibrain/_STRUCTURE.md | **Living reference** |
| Vault Index | jibrain/INDEX.md | **Living reference** |

### Agent System Docs

| Document | Location | Status |
|----------|----------|--------|
| Unified Architecture | jibot-docs/design/jibot-unified-architecture.md | **Canonical** |
| NanoClaw Migration | jibot-docs/design/2026-02-23-nanoclaw-migration-plan.md | **Active** |
| Switchboard Sharing | jibot-docs/design/switchboard-sharing.md | **Active** |
| Workflows | jibot-docs/design/workflows.md | **Active** |
| WhatsApp Commands | jibot-docs/design/whatsapp-commands.md | **Active** |
| Inbox Conventions | jibot-docs/design/inbox-conventions.md | **Active** |
| Deprecations | jibot-docs/design/DEPRECATIONS.md | **Active** |

### Integration Docs

| Document | Location | Status |
|----------|----------|--------|
| Ethoswarm Architecture | jibrain/intake/ethoswarm-architecture.md | **Draft** |
| Ethoswarm Integration Thread | jibrain/intake/.observations/ | **Active** |
| jimindbot System Prompt | agents/_shared/jimindbot-system-prompt.md | **Active** |

---

## 10. Quick Reference: "How Do I..."

| Task | System | Method |
|------|--------|--------|
| Bookmark a URL | WhatsApp | Just paste the URL (bare URL auto-bookmarks) |
| Bookmark a URL (CLI) | bash | Run the bookmark-intake script with the URL |
| Search vault by keyword | Amplifier | `mcp_qmd_search(query="...")` |
| Search vault semantically | Amplifier | `mcp_qmd_vector_search(query="...")` |
| Deep search (hybrid) | Amplifier | `mcp_qmd_deep_search(query="...")` |
| Check vault health | Amplifier | `vault(operation="knowledge_health")` |
| Find stale contacts | Amplifier | `vault(operation="people_stale")` |
| Search chanoyu | Amplifier | `vault(operation="chanoyu_search", query="...")` |
| Extract from PDF book | CLI | Run extract_book_chunked.py with the PDF |
| Extract Japanese docs | CLI | Run batch_knowledge_extract.py in the knowledge-extract directory |
| Run jibrain triage | Amplifier | Use triage recipe to scan intake, cross-reference vault, generate review queue |
| Extract from meetings | Amplifier | Use meeting-extract recipe to process transcripts and create intake files |
| Reweave knowledge | Amplifier | Use reweave recipe to connect promoted knowledge to existing notes |
| Build knowledge graph | CLI | `make knowledge-graph-build` in the amplifier directory |
| Search knowledge graph | CLI | `make knowledge-graph-search QUERY="..."` |
| Visualize tensions | CLI | `make knowledge-graph-viz` |

---

*[Back to learnings](/learnings/index.md) · [Back to the front page](/index.md)*
