Multi-Agent Static Bug Detector for Specialised C++
AI products · Sole engineer · complete
Generic linters miss domain-specific mistakes in specialised C++ because they do not know the API's rules. Those rules live only in a hardware vendor's manual, which no static analyser has read.
The detail
The design is context-first. Before any language model sees the code, a lookup agent queries a documentation server and retrieves the relevant API rules. Only then does detection run - with the manual already in context. That ordering matters more than the choice of model, because it converts a vague 'this looks suspicious' into 'this violates the documented contract for this call'.
Detection runs two independent layers - deterministic pattern matching and language-model reasoning - and raises confidence where they agree. Pattern matching alone produces false positives; model reasoning alone produces confident hallucinations. Agreement between two different mechanisms is real signal, and anything below a confidence threshold is dropped.
Three model providers are interchangeable so the harness can be evaluated across them without code changes. CSV in, CSV out for batch runs.
Python, MCP, LlamaIndex, BGE embeddings.
What I did
- Designed the context-first architecture that retrieves API rules before any model sees code
- Built the documentation retrieval server with embedding search and caching
- Implemented two-layer detection combining pattern matching with model reasoning
- Designed consensus-based confidence scoring with a precision threshold
- Made three model providers interchangeable for cross-model evaluation
- Built batch CSV processing for evaluation runs
Stack
Python, AI Agent Development, Machine Learning, API Integration, MCP, LlamaIndex, BGE Embeddings, C++, Multi-Agent Systems
Case study: https://www.siddhvasudev.com/projects/multi-agent-static-bug-detector-for