LogicLens: Leveraging Semantic Code Graph to explore Multi Repository large systems
Niko Usai, Dario Montagnini, Kristian Ilianov Iliev, Raffaele Camanzo
TL;DR
LogicLens tackles the problem of understanding large, distributed software by building a persistent semantic graph that unifies structural code relationships with domain-level semantics across multiple repositories. It introduces a GraphRAG-based agent that retrieves subgraphs and uses specialized tools to answer technical and workflow queries spanning multiple projects. The method comprises a three-phase graph construction (Structural Graph, Semantic Graph, Semantic Graph Enhancement) and an interactive agent architecture that leverages domain entities to enable cross-repository reasoning and emergent capabilities such as impact analysis and symptom-based debugging. Evaluation on real-world multi-repo systems shows substantial improvements in accuracy and coherence over a baseline vector-based approach, demonstrating practical value for onboarding, debugging, and system understanding in complex software landscapes.
Abstract
Understanding large software systems is a challenging task, especially when code is distributed across multiple repositories and microservices. Developers often need to reason not only about the structure of the code, but also about its domain logic and runtime behaviors, which are typically implicit and scattered. We introduce LogicLens, a reactive conversational agent that assists developers in exploring complex software systems through a semantic multi-repository graph. This graph is built in a preprocessing step by combining syntactic code analysis, via AST parsing and repository traversal, with semantic enrichment using Large Language Models (LLMs). The resulting graph captures both structural elements, such as files, classes, and functions, as well as functional abstractions like domain entities, operations, and workflows. Once the graph is constructed, LogicLens enables developers to interact with it via natural language, dynamically retrieving relevant subgraphs and answering technical or functional queries. We present the architecture of the system, discuss emergent behaviors, and evaluate its effectiveness on real-world multi-repository scenarios. We demonstrate emergent capabilities including impact analysis and symptom-based debugging that arise naturally from the semantic graph structure.
