
Developers often struggle not only with writing code, but with understanding code written by others, legacy code, unfamiliar repositories, generated code, and complex functions. A developer may ask: What does this code do? Why is it used here? Which parts depend on it? Is there an error? How can it be improved? Finding these answers often requires switching between the editor, documentation, search engines, debugging tools, and separate AI chat applications. Our AI Code Understanding Assistant solves this problem by bringing contextual code understanding directly into the developer workflow. The system combines a VS Code extension and developer interface with a NestJS backend and a dedicated FastAPI AI Engine connected to Ollama. A developer can select code or analyze a complete file from the coding environment. The system captures relevant context such as programming language, source code, file path, and optional developer context, and sends it to the backend. The backend forwards the request to the AI Engine, where specialized analysis capabilities process the code and return understandable results. The assistant supports multiple analysis areas including code explanation, error explanation, structure, dependencies, and improvement suggestions. Results are designed to be understandable and traceable, with confidence information and evidence such as source-code evidence. The system avoids inventing unsupported symbols, relationships, or confidence scores when they cannot be verified. Our target users are software developers, students, engineering teams, and anyone who needs to understand unfamiliar or difficult code quickly. Instead of leaving the development environment and manually explaining code to another tool, users can interact with the assistant as part of their normal coding workflow. The creative aspect of the project is the combination of developer-context capture, structured AI analysis, evidence-aware results, confidence handling, and a separate AI Engine architecture. This allows the system to provide more structured and explainable code understanding rather than returning only a generic AI response. The architecture also focuses on reliability and reproducibility. The backend provides request validation, correlation IDs, structured logging, error mapping, and health/readiness endpoints. Docker Compose provides a reproducible multi-service environment, while Ollama enables local model execution. We validated the complete workflow through real end-to-end testing: developer/client → NestJS backend → AI Engine → Ollama → LLM → backend response. Automated regression tests, Docker validation, service-to-service connectivity checks, error-path testing, security checks, and real Llama 3 and Qwen3 inference were used to verify the system. The result is a developer-focused AI assistant designed to reduce the time and effort required to understand code and help developers work more confidently with unfamiliar software.
27 Sep 2026