Project Briefing
DocuBot is a fully native macOS application that brings AI-powered documentation search directly to your machine — privately, efficiently, and entirely offline. Designed for developers who want instant understanding of their codebase documentation without exposing their project to external servers, DocuBot reads, indexes, and semantically understands your project’s documentation files to provide accurate, context-aware answers to your technical questions.
Instead of manually searching through sprawling Markdown files or poorly organised docs, DocuBot “studies” your project by scanning your documentation directory, intelligently chunking content, generating embeddings, and storing them in a similarity index. When you ask a question, DocuBot identifies the most relevant documentation sections and either presents the raw excerpts (Strict Mode) or has an on-device LLM generate a clear, human-readable response. All of this happens locally — no cloud processing, and no data ever leaves your Mac.
DocuBot will:
- Index documentation files from your project directory, including Markdown and plain text.
- Automatically detect file changes through checksum comparisons and prompt for re-indexing.
- Chunk long documents into manageable sections for reliable and high-precision retrieval.
- Generate semantic embeddings to understand and compare the meaning of documentation text.
- Store embeddings in a configurable similarity index (e.g., cosine similarity).
- Provide instant, structured responses from the source documentation (Strict Mode).
- Generate polished explanations using an on-device LLaMA model through llama.cpp.
- Allow users to select or import their own AI models for performance tuning or accuracy.
- Run entirely offline for strong privacy guarantees.
Technical Details
- DocuBot is written entirely in Swift 6 and built with a strict, modern Swift concurrency model.
- The application is structured into modular SPM packages (UI, ViewModel, Service, Model, and Toolbox) for clean architecture and strong testability.
- SwiftUI is used for the macOS UI layer.
- SwiftTesting is used for all unit tests, with >80% coverage across modules.
- Embeddings are generated using LLM.swift, and vector searches are powered by similarity-search-kit.
- An on-device LLaMA 3 model is executed through llama.cpp for fast, private inference.
- GRDB provides robust, type-safe SQLite storage for embeddings and metadata.
- The app uses SwiftGen and SwiftLint as part of its build process for consistency and safety.
- Operates entirely offline, aside from the optional built-in model download.
