Architecture

Overview of the architecture patterns used across my AI and systems projects.

NexusAOS — Governance-First AI Operating Environment

Production-ready, event-sourced AI operating environment for Ubuntu Linux, written in Rust as a 12-crate workspace with 981 passing tests and full CI/CD.

  • Policy-enforced agent kernel: models propose actions, the kernel validates and records every state change
  • Append-only event-sourced audit trail with reversible, permissioned actions
  • Provider-agnostic LLM layer: OpenAI-compatible and Anthropic streaming, LiteLLM routing, local-first inference
  • Native terminal emulation (PTY + VT100), SSH multiplexing, secrets vault, CLI/TUI/GUI/RPC interfaces

RAG Service — Hybrid Retrieval Pipeline

FastAPI RAG service combining dense embeddings and BM25-style keyword scoring, fused with Reciprocal Rank Fusion (RRF) over a persistent ChromaDB vector store.

  • Word-based chunking with overlap; embeddings via sentence-transformers or a deterministic hashing fallback
  • Grounded answers with source citations via any OpenAI-compatible chat endpoint (offline echo fallback)
  • 28 tests; evaluated end-to-end with the LLM Eval Harness

LLM Eval Harness — Golden-Set Evaluation

Reusable CLI + library that scores LLM/RAG outputs against golden sets and emits CI-ready JSON + Markdown reports.

  • Metrics: faithfulness, answer relevance, correctness (per-case + mean/min/max summary)
  • LLM-as-judge when an API key is present; offline lexical fallbacks keep CI free
  • 15 tests; gates the RAG Service pipeline

SeshaOS — Local-First AI OS

NexusAOS v2 with specialist local models and LiteLLM-compatible routing.

  • Specialist model stack: Gemma 4 12B (Planner), Qwen3-Coder 30B (Implementation), Qwen3.5 9B (Vision)
  • Kernel-centric governance where models propose actions and the kernel validates/records state changes
  • Event-sourced architecture with reversible, permissioned actions and offline-first execution

Vyākṛti — Compiler + IDE

Sanskrit-oriented programming language with complete compiler pipeline and browser-based IDE.

  • Complete compiler pipeline: lexer → parser → type checker → bytecode compiler in Rust
  • Browser IDE with React, Monaco Editor, syntax highlighting, autocomplete, and diagnostics
  • Rust (axum) backend with compile, REPL, LSP, and file management endpoints
  • 123 tests covering the full pipeline, including a self-hosting corpus