Towards LLM-Assisted Architecture Recovery for Real-World ROS 2 Systems: An Agent-Based Multi-Level Approach to Hierarchical Structural Architecture Reconstruction
Dominique Briechle, Raj Chanchad, Tobias Geger, Ruidi He, Dhruv Jajadiya, Dhruv Kapadiya, Andreas Rausch, Meng Zhang · 2026
Read Towards LLM-Assisted Architecture Recovery for Real-World ROS 2 Systems: An Agent-Based Multi-Level Approach to Hierarchical Structural Architecture Reconstruction by Dominique Briechle, Raj Chanchad, Tobias Geger, Ruidi He, Dhruv Jajadiya, Dhruv Kapadiya, Andreas Rausch, Meng Zhang (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-20055.txt.
Introduction
Dominique Briechle and seven co-workers recover software architecture for real ROS 2 robotic systems with help from large language models. In such systems the hierarchy of parts and their integration rules hide implicitly across code and launch files, beyond simple node lists and wiring. Their staged, blueprint-guided pipeline refines prompts for consistency and rebuilds structure level by level from atomic nodes and launch dependencies. Tested on a real automated product-disassembly system with cooperative arms, recovery gains structural consistency, scalability and robustness, though dynamic integration semantics remain a challenge.
Catalog record
| CREATOR | Dominique Briechle, Raj Chanchad, Tobias Geger, Ruidi He, Dhruv Jajadiya, Dhruv Kapadiya, Andreas Rausch, Meng Zhang |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 36482 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.20055
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Towards LLM-Assisted Architecture Recovery for Real-World ROS 2 Systems: An Agent-Based Multi-Level Approach to Hierarchical Structural Architecture Reconstruction Dominique Briechle, Raj Chanchad, Tobias Geger, Ruidi He, Dhruv Jajadiya, Dhruv Kapadiya, Andreas Rausch, Meng Zhang Abstract Explicit software architecture models are essential artifacts for communicating, analyzing, and evolving complex software-intensive systems. In ROS 2-based robotic systems, however, structural (de-)composition and integration semantics are often only implicitly encoded across distributed artifacts such as source code and launch files, making recovery of hierarchical architecture particularly difficult. Existing approaches mainly focus on node-level entities and communication wiring, while providing limited support for recovering hierarchical structural (de-)composition across multiple abstraction levels. In this paper, we extend our previously proposed blueprint-guided LLM-assisted architecture recovery pipeline for ROS 2 systems through two major enhancements: (1) refined prompting to improve the consistency and controllability of architecture synthesis, and (2) a staged recovery strategy based on multi-level intermediate architectural representations that incorporate the atomic ROS node list and launch file dependencies, thereby enabling structurally constrained reconstruction across multiple abstraction levels. The approach is evaluated on a real-world automated product disassembly system based on cooperative robotic arms and heterogeneous ROS 2 artifacts. Compared to our previous work, the considered case study exhibits substantially higher integration complexity and richer functionality. The results demonstrate improved structural consistency, scalability, and robustness of architecture recovery, while also revealing remaining challenges related to dynamic integration semantics in large-scale ROS 2 systems. 1 Introduction Explicit software architecture models capture abstractions beyond implementation details and support communication, analysis, documentation, maintenance, and evolution of complex software-intensive systems. Established frameworks such as C4 [ 5 ] , arc42 [ 16 ] , and Kruchten’s 4+1 View Model [ 12 ] organize architectural descriptions across abstraction levels and viewpoints. Component- and code-oriented views, in particular, require hierarchical structural (de-)composition to represent subsystem boundaries, dependencies, and communication relationships consistently [ 5 ] . In practice, however, architecture models are often incomplete, outdated, inconsistent, or absent [ 1 , 15 ] . Long-lived systems evolve through incremental implementation, continuous integration, and localized design decisions, causing architectural drift. This drift reduces comprehensibility, maintainability, and traceability, motivating automated architecture recovery from implementation and configuration artifacts. While this problem is common in many software-intensive systems, it is particularly pronounced in distributed cyber-physical systems, especially ROS 2-based robotic and autonomous applications. In such systems, hierarchical composition of runtime node instances is rarely available as a complete and maintained architecture model. Instead, subsystem boundaries, node instances, communication relations, namespaces, remappings, and launch-induced compositions are implicitly encoded across source code, build files, launch files, and parameter files. Consequently, hierarchical ROS 2 architecture recovery must reconstruct structure from dispersed evidence rather than from an explicitly maintained model. Recovering such architectures requires more than syntactic analysis: it requires interpreting integration semantics across abstraction levels, including launch-induced composition, namespace propagation, remapping, and runtime node instantiation. LLMs have therefore attracted interest for architecture recovery and documentation generation because they can infer higher-level structural and semantic relationships from heterogeneous software artifacts, e.g., [ 21 ] . However, without system-specific architectural knowledge, recovery lacks guidance on the intended viewpoint, admissible ROS 2 elements, valid structural relations, and repository evidence required to justify recovered abstractions. But as a result, unconstrained LLM-based recovery may produce implausible, incomplete, inconsistent, hallucinated, or structurally unsupported elements. These limitations motivated a constrained recovery approach that makes system-specific architectural knowledge explicit and uses it to guide LLM-assisted synthesis. In our previous work [ 3 ] , we introduced a UML-based modeling concept for hierarchical structural ROS 2 architectures and used it as a blueprint for LLM-assisted recovery. Based on this blueprint, the recovery approach combines deterministic structural extraction with LLM-based synthesis constrained by explicit architectural contracts derived from ROS 2 structural conventions. The evaluation showed that ROS 2-specific architectural knowledge supports structurally valid multi-level reconstruction with traceability to repository artifacts. However, recovery quality decreased for repositories with complex launch-induced composition and distributed integration semantics, especially for namespace propagation, remappings, executable-to-node mappings, and hierarchical subsystem composition. This paper retains the previously introduced UML-based modeling concept as the target blueprint, but refines the recovery process through a staged strategy with explicit intermediate artifacts. Instead of synthesizing subsystem structures directly from raw repository artifacts, the proposed approach reconstructs architectural information incrementally. It first identifies atomic ROS 2 nodes and node-local communication interfaces, then uses launch-dependency and node-instance representations to capture launch-time instantiation, namespaces, remappings, communication relations, and subsystem structures. The launch-dependency representation makes launch-file inclusion and launch-to-node containment explicit before system-level synthesis. By making intermediate recovery evidence explicit, the approach reduces semantic ambiguity, improves traceability, and increases the controllability of LLM-assisted architecture synthesis. The proposed approach is evaluated on a real-world executable ROS 2 robotic system with richer functionality and more heterogeneous artifacts than the controlled examples in the previous study [ 3 ] . The evaluation analyzes whether staged, blueprint-guided recovery improves structural correctness, robustness, and scalability under integration-intensive conditions, while identifying remaining limitations in recovering complex launch-induced composition. The remainder of this paper is structured as follows. Section 2 reviews related work on ROS 2 architecture recovery and LLM-assisted software engineering. Section 3 introduces the case study and its repository characteristics. Section 4 presents the staged recovery approach, including intermediate representations, blueprint-guided synthesis, and prompt-engineering concepts. Section 5 reports the evaluation results. Section 6 concludes the paper and discusses limitations and future work. 2 State of the Art By design, ROS 2 is a decentralized, component-oriented framework in which different functionalities are represented via nodes. With the pub-sub pattern at its core, these nodes are interconnected to one another by topics, services, and actions. However, the artifacts necessary to integrate a ROS 2 system consist of the different setup, launch, and CMake files, which, therefore, contain integral information necessary for understanding the system’s architecture. Although already several approaches exist for modelling of ROS 2 architectures, they vary considerably in terms of their support regarding the implementation of the ROS 2 core concepts. One of the prominent examples includes MeROS, developed by T.Winiarski in 2023 [ 19 ] , which provides a SysML (Systems Modeling Language)-based metamodel for the organizations of different architectural artifacts of cognitive robot systems. Further current challenges in manual modelling efforts are pointed out, highlighting the necessity of automated architectural recovery tools [ 19 ] . P. Kumar et al. [ 13 ] introduced with ROSMOD a model-driven approach for developing large-scale robotic systems. Wanninger et al. [ 18 ] propose with ROSSi a graphical programming interface resulting in a tool for graphical development of ROS 1 projects. With ROSpec, P. Canelas developed a domain-specific language, allowing the specification and verification of ROS-based systems [ 6 ] . An approach for the modelling of nodes and systems via the Architecture Analysis and Design Language (AADL) is presented in [ 2 ] . LLM-based systems for system architecture generation have been used in different contexts for the generation of architectural artifacts. For example, CodeBERT, using general-purpose presentations as foundations, is used for code documentation generation [ 9 ] . CIAO (Code In Architecture Out), introduced by M. De Luca, is based on an LLM-based framework, which uses a repository as a foundation for the generation of the documentation of system-level