Architecture of Multi-agent System for Automatic Code Template Maintenance
摘要
In modern software engineering, template-based code generation, and in particular Large Language Model (LLM) driven code synthesis, have been identified as key enablers of developer productivity in environments in which complex, predefined components are subject to continuous adaptation to evolving requirements. However, the maintenance of code generator templates is frequently performed as a manual, error prone task when dependencies on external specifications or components are present, especially when they change often. To address this gap, a Multi-Agent System (MAS) is proposed, in which LLMs are relied upon for the interpretation of template code, and Model-Driven Software Development (MDSD) principles are applied for the structured representation of templates. In this system, specialized agents are tasked with detecting and interpreting changes in external specifications, performing targeted updates to template code, and validating consistency against a canonical model. Communication among agents, and the storage of semantic embeddings of template fragments and domain models, are managed through a vector database, thereby enabling retrieval of prior template versions and reasoning over them. The proposed solution is to be integrated into an existing MDSD solution for uniform access to vector databases as proof of concept.