⚠️ ARCHIVE NOTICE: This repository serves as the V0.1 prototype and has been officially frozen. Active development for the V1.1.0 Clean Break architecture has moved to a new repository. This codebase is preserved as a "Write-Only Archive" for historical reference and structural guidance.
A violin for the mind. Claire is a local-first, modular system for managing document libraries — built on the conviction that knowledge management should be an act of structured control, not passive automation.
Most tools treat documents as inert files to be searched. Claire treats them as living material to be worked — tagged, linked, compared, and synthesised through deliberate friction that makes the act of gathering and sharing knowledge a delightful, mind-sharpening activity.
- Instrument, not autopilot. Claire provides structured control surfaces — visible levers, tactile harnesses — not a single chat window. The UI exists to aid the user in becoming a Knowledge DJ, orchestrating an AI-powered memetic remix through deliberate interaction.
- Flow, not prompting. The quality bottleneck is always upstream — in extraction quality, embedding fidelity, or retrieval precision — never in the final prompt. Claire tunes the pipeline, not the last mile.
- Beautiful friction. Remove friction from importing, searching, and navigating. Add friction to publishing synthesis, merging duplicates, and deleting sources. The system builds the gym where you do the heavy lifting.
- Library in the cockpit. Plain nouns and verbs in the UI — Library, Source, Note, Add, Link, Review. The underlying architecture is ecological and self-organising, but users never need to learn the biology vocabulary.
- Warm stillness. Every surface feels like a curated study — handmade stationery, not a SaaS dashboard. Typography is the primary visual element. Negative space is the primary design material.
Claire is headless-first, frontend-optional. The backend is the complete product—a full CLI and API runnable on any machine (NAS, Docker, Raspberry Pi). The frontend is a luxury client that provides spatial layouts and a modern UX on top of capabilities that already work headlessly.
The entire capability surface of Claire is governed by the Four Gates Doctrine — a convergence model ensuring zero semantic drift between data, logic, agents, and UI:
- Object Gate (Postgres schemas, Pydantic models): The shape of truth — every entity, record type, and relationship.
- Verb Gate (
/docs): The definitive map of all deterministic operations (CRUD, search, extract, export). - Entity Gate (AI Observatory): The definitive map of all autonomous, conversational, and AI-driven capabilities (Agents and DSPy Signatures).
- Affordance Gate (Frontend): Every button maps to exactly one Verb — deterministic skill invocation with zero business logic leakage.
Clean Room: All core Python modules live under
backend/following Hexagonal Architecture (Ports & Adapters).
Claire follows a Sidecar Architecture. While the core engine is Python-based, it offloads heavy-duty processing and persistence to a set of specialized external services. These are typically managed via Docker:
| Service | Primary Role | Details |
|---|---|---|
| PostgreSQL | Relational Metadata | The primary source of truth for library catalogs, project memberships, and notes. Uses pgvector for embedding storage. |
| Redis | Task & Cache | Manages task state orchestration, job cancellation, and high-performance API response caching (DB 0: Cache, DB 1: Tasks). Redis 8.4+ also provides native vector search for the Document Co-Reader. |
| Ollama | LLM Orchestration | Orchestrates local inference for document identification. Fully supports OpenAI-compatible 3rd party providers (LM Studio, OpenRouter, etc.). |
| Apache Tika | Multi-format Extract | Handles text/metadata extraction from legacy and standard document formats (PDF, Office, etc.). |
| Docling | Advanced OCR | Managed via docling-serve (managed isolated instance) for high-fidelity layout-aware PDF analysis and OCR. |
| Gotenberg | View Generation | Stateless engine for converting HTML/Markdown/Office documents to high-fidelity PDF for the document viewer. |
| Qdrant | Vector Search | Dedicated high-density vector database for semantic search and large-scale knowledge retrieval. |
- Projects — Logical cross-library research workspaces, dedicated reading list, AI Librarian (natural-language filter synthesis via DSPy), portable
.clairesandboxes (includes linked-note snapshots), and flat-file export (notes as.md+ JSONL sidecar) for external RAG. Project-scoped notes are bridged to both the Agent Notes tab and the Agent Chat tab viaworkspace-store. Supports many-to-many associations between notes and projects. - Notes (The Idea Collider) — Zettelkasten-style knowledge capture with ULID keys, JSONB plugin registry, full-text search via TSVECTOR, configurable taxonomy, directional knowledge graph links, source attribution, Markdown export, and project association (many-to-many via
claire_project_notes). Enhanced withDynamicTextareaandCommandPreviewPopoverfor Magic Notes composition. - Catalog — Library registry, document indexing, analysis, AI tagging via decoupled taxonomy (fully dynamic system taxonomy), Content Passport, and
SYSTEMgovernance layer for human-managed metadata. - Identify — LLM-powered document metadata extraction and standardised renaming with dry-run support.
- Extract — Multi-engine text extraction (PyMuPDF → Tika → MarkItDown → Docling) with format-aware pipeline selection.
- Search — Intelligent librarian-style search with keyword decomposition, recursive filtering, and multi-step research via Perplexity synthesis.
- Transcribe — YouTube subtitle capture, tiered subscription management, randomised cyclic scheduling, and activity-based auto-lapsing.
- Match — SHA-256 deduplication, Levenshtein title matching, and structured archive workflow with side-by-side comparison.
- Manage — Library registry management, read-only DB exploration, NDJSON export, and configurable backups.
- Train (The Agent Laboratory) — Agent tuning workspace with interactive agent selector, DSPy telemetry, reasoning traces, and direct-chat test console.
- Agent Engine — Federated multi-agent system kernel (Google ADK) with Live RAG, embedding integration, and real-time hardware telemetry.
- Extensions (The Tinkerer's Workbench) — Sandboxed execution environment for custom workflows. Supports dual-root discovery (builtin + user), AST-level security guarding, and isolated subprocess execution with restricted network and filesystem access. Integrated directly into the Magic Notes editor via the slash-command menu.
- TOML-Mod — Universal config editor with four-tier config mesh, auto-discovery, inline
_metaconvention, and Settings UI with Modules, Libraries, and Agents views.
Vite + React + TypeScript SPA with a Japandi Library aesthetic — warm stillness as the antidote to information overload. Runs anywhere and connects to the backend via a dynamic ServerPicker UI.
- Design system: Claire-UX tokens — Playfair Display / Noto Sans / Noto Serif / JetBrains Mono
- Icons: Google Material Symbols (features) + Lucide React (shadcn infrastructure)
- Components: 49 shadcn-ui primitives + 12 Claire composites
- Themes: Light (Japandi Sun-dappled Library), Dark (Shinjuku Cocktail Bar), Cyber (Muted Synthwave Akihabara)
- Component Library: Interactive showcase at
/showcase/components
Detailed guides, architecture references, and configuration documentation live in the docs/ directory:
- Project Context & conventions — design intent, architecture patterns, and sprint-level rules
- Architecture — module-level technical documentation (Live RAG source)
- Command Reference — CLI and API command documentation (Live RAG source)
- Configuration Guide — TOML configuration reference (Live RAG source)
- Database Schemas — Postgres and Redis schema documentation (Live RAG source)
# Backend
python -m venv .venv && source .venv/bin/activate
python -m pip install -e '.[dev]'
pytest # runs tests in sandbox/tests
# Frontend
cd frontend && npm install
npm run dev # dev server on port 3000
npm run build # production bundle to dist/Claire uses IBM's Docling for high-quality OCR and PDF extraction, but it is intentionally kept out of the project .venv to prevent dependency conflicts.
During local development, running ./quickstart.sh automatically spins up a local instance of docling-serve on port 5001 using uvx — fully sandboxed without polluting the project environment.
To run it manually in isolation:
uvx "docling-serve[ui,easyocr,rapidocr]" run --enable-ui --port 5001