Monorepo Architecture
Cortex is organized as a monorepo with eight focused packages, each with a clear responsibility.
Data Flow
@gzoo/core
Shared types, configuration management, and SQLite database layer. The foundation everything else builds on.
@gzoo/ingest
File watching, content parsing, and entity extraction pipeline. Turns raw files into structured knowledge.
@gzoo/graph
Knowledge graph construction, relationship inference, and contradiction detection engine.
@gzoo/llm
Multi-provider LLM abstraction with intelligent routing between cloud and local models.
@gzoo/cli
Command-line interface for all Cortex operations. The primary user-facing entry point.
@gzoo/mcp
Model Context Protocol server for integration with Claude Code and other MCP-compatible tools.
@gzoo/server
HTTP API and WebSocket server powering the web dashboard with real-time updates.
@gzoo/web
Interactive web dashboard with knowledge graph visualization and query explorer.