
I Built a Self-Healing Codebase Using NATS, Claude AI, and A/B Code Tournaments
The Problem I run 30+ projects across multiple servers. When something breaks — a test fails after a push, a dependency update causes a regression — I used to find out hours later, context-switch, dig through logs, and fix it manually. That workflow doesn't scale. So I built ChangeBus : a distributed agent system where AI fixes compete against each other in tournaments, and only the winner gets merged. The Architecture ChangeBus is built on three ideas: Signal over noise — detect real changes, not everything A/B tournaments over single-shot generation — two AI-generated fixes compete; the better one wins Feedback loops — the system learns which strategies produce better fixes over time The Stack Component Technology Event Bus NATS + JetStream Language Python 3.11+ (async) AI Claude API (Anthropic SDK) Event Store SQLite (WAL mode) Git Operations GitPython + subprocess Notifications Discord webhooks Monitoring Prometheus + Grafana Process Mgmt systemd How It Works Git push detected → NA
Continue reading on Dev.to Python
Opens in a new tab



