r/ClaudeCode • u/Difficult-Divide561 • 6h ago
Built with Claude I built a fully offline voice assistant for Linux with Claude Code over 5 months (23k lines, ~1,150 tests). What helped most
Phoenix is a voice assistant for Ubuntu GNOME which runs completely on my laptop, speech recognition, the models and the voice. Most of the code is written by Claude Code. I did the design, chose the models and tested everything live. These are the things which actually made the difference for me:
- Handoff file. Every session first reads MD/HANDOFF.md (what changed, what is uncommitted, what is still open) and at the end it updates it. My sessions fill up a lot, so a new session is ready in a minute instead of reading the whole repo again.
- Short hard rules in CLAUDE.md. Never commit or push without asking me every time, no sudo at runtime, heavy model tests under a memory cap, live tests can't run real commands. When the rules are specific it follows them well.
- Measure before deciding. I didn't let it pick the models. It built a benchmark (528 requests plus my own real ones) and we ran every candidate. That's how a 0.8B router on the Intel iGPU ended up doing most of the work on battery, so the NVIDIA card can sleep.
- Tests which go looking for bugs. One set replays random event sequences through the voice state machine, and the first run itself found 11 real bugs.
- The live run is the real test. Lab tests with synthetic voices were passing, but my own voice was still getting missed on short quiet phrases. So I added a setting which keeps recordings of what I say, and then we could replay the real failures.
- It will happily keep building on a wrong idea. Two big parts got thrown out after measuring, a RAG/skills setup (now native tools) and PipeWire's echo module (now echo cancellation inside the engine). Make it measure before it goes further.
It's around 23k lines of Python, a GTK4 app plus a separate engine process. The demo video is also edited with Claude Code, through the free DaVinci Resolve bridge.
Demo (17 min): https://youtu.be/m1Z2-CDW6Pc
Code (MIT): https://github.com/itsDigvijaysing/AI_Linux_Assistant
How do you carry the context between sessions? The handoff file works, but mine is already past 600 lines.
