Rewriting Archivist with Claude Code
A case study in AI-assisted software development
Integral Business Intelligence builds AI systems for businesses that work with sensitive data. We believe the most credible way to sell AI integration is to use it ourselves — in our own products, on our own infrastructure, solving our own real problems. The rewrite of Archivist from v0.2.9 to v0.3.0 is the most concrete example we have of that principle in practice, and Claude Code was central to how we executed it.
The Starting Point
Archivist v0.2.9 was built quickly, deliberately. When we first developed it, the goal was to validate the idea: could a small, local Windows application let a user upload their own documents and ask natural language questions about them, entirely on their own hardware, with no data leaving the machine? It could. Users used it. That was the goal, and we hit it.
The stack we chose reflected the tooling available at the time:
- Python for all backend logic — document processing, AI inference, vector search
- Gradio for the frontend — a rapid prototyping library that let us build a UI without writing a UI
- Electron to package everything as a Windows application
- Chroma as the vector database for document embeddings
By v0.2.9, the concept was proven and the technical debt was real. Gradio was not built for producing polished application interfaces — it is a demo tool, and it showed. The Python-plus-Electron architecture required bundling a Python interpreter into every installer, producing unnecessarily large packages and adding complexity to the packaging pipeline. Chroma was more infrastructure than a single-user, fully-local application justified; the similarity search we needed was a fraction of what it was designed to handle.
The decision to rewrite was not a crisis — it was a recognition that we now had better options, and that staying with the original stack would continue to accumulate cost.
Why the Rewrite Was a Hard Problem
A rewrite of this scope is not a straightforward task. Archivist has multiple interconnected subsystems: document ingestion and chunking, embedding generation, vector similarity search, AI inference with prompt construction, a stateful UI with multiple panels, local model management, licensing, and packaging. These systems had to be re-implemented in a new language while preserving existing behavior for current users.
The challenge was not any single component — it was the breadth. There were hundreds of decision points where the new implementation needed to match the behavior of the old one, diverge from it intentionally, or improve on it. Managing that across a codebase of this size, largely as a small team, was where Claude Code became genuinely valuable.
How We Used Claude Code
Translating Logic Across Languages
The most direct use was code translation. Python logic that handled document chunking, embedding lookups, and query construction needed to be re-expressed in the new implementation language. This is mechanical work, but it is error-prone mechanical work — the kind where a subtle off-by-one or a missed edge case creates a bug that only surfaces with a specific document structure weeks after shipping.
Claude Code handled large portions of this translation well. We would provide the original Python function, the target language's idioms, and the context for what the function was supposed to do. The output was consistently usable — not always final, but a solid starting point that we could review and refine rather than write from scratch.
The SQLite Migration
One of the most consequential architectural decisions of the rewrite was replacing Chroma with SQLite. This was not a simple swap — it meant implementing our own similarity search logic on top of a general-purpose database.
We used Claude Code as a thinking partner through this decision. We described our constraints: single-user, fully local, modest document library sizes, no external processes, a need to keep the entire database as a portable single file. Claude Code helped us reason through the approach — how to store embeddings efficiently in SQLite, how to implement cosine similarity at query time without a dedicated vector index, what the performance tradeoffs looked like at different library sizes, and where the approach would start to break down if the use case scaled beyond our target.
The resulting implementation is simple, fast, and easy to reason about. It does exactly what Archivist needs and nothing it does not. That outcome was shaped by having a technically fluent collaborator to think through the design with, not just generate code for.
Catching What We Would Have Missed
During the similarity search implementation, Claude Code identified a normalization issue in the embedding storage approach that would have produced subtly incorrect ranking results — not a crash, just quietly wrong answers for certain query types. That kind of bug, caught in development, is exactly the class of problem that a thorough human review might also catch, but also might not, especially under the time pressure of a substantial rewrite.
We found this pattern repeated throughout the project: Claude Code as a second set of eyes, with no ego investment in the existing code and no fatigue from having written it.
The UI Rebuild
Replacing Gradio with a proper application UI framework required building out component structure, state management, and interaction patterns largely from scratch. Claude Code was useful here in a different way — less about translation and more about scaffolding. Given a description of what a panel needed to do, it could produce a reasonable initial implementation that established the structure and handled the common cases, which we then refined toward the final behavior.
What Changed in v0.3.0
The rewrite delivered on its goals:
- Native implementation — no bundled Python interpreter, leaner installers, faster startup
- Real application UI — layouts and interactions that feel like a Windows application rather than a wrapped web demo
- SQLite replacing Chroma — the user's entire document library is a single portable file, with no external database process
- Cleaner architecture — subsystems with cleaner interfaces, easier to extend as the application evolves
What This Means for Our Clients
Integral Business Intelligence advises businesses on AI adoption. When we tell a client that AI-assisted development is worth evaluating seriously — that tools like Claude Code can change the economics of a software project — we are not speculating. We ran that experiment on our own software.
The rewrite that might have taken significantly longer with a small team working conventionally was completed on a timeline that let us ship v0.3.0 as a meaningfully better product, not just a port. Claude Code contributed to that outcome in measurable ways: accelerating the mechanical work, improving the quality of architectural decisions, and catching defects early.
We are an AI systems integrator. The credibility of that position depends on using AI systems well ourselves. The v0.3.0 rewrite is part of the evidence for that claim.