Theodoros Tsampouris, Dept. of Electrical and Computer Engineering, Aristotle University of Thessaloniki, Greece
Emmanouil Tsardoulias, Dept. of Electrical and Computer Engineering, Aristotle University of Thessaloniki, Greece
Konstantinos Panayiotou, Dept. of Electrical and Computer Engineering, Aristotle University of Thessaloniki, Greece
Andreas L. Symeonidis, Dept. of Electrical and Computer Engineering, Aristotle University of Thessaloniki, Greece
Domain-Specific Languages, apart from the design and formal definition aspects involved to build, also require Model-to-Text (M2T) transformations to generate executable code. Authoring the M2T templates is a manual, labor-intensive process that often generates frustrating, time consuming errors. And, although Large Language Models have advanced code and grammar generation, the automated synthesis of downstream Model-to-Text templates still remains largely unaddressed. In the context of software engineering and model-driven development, automating such transformations addresses a core challenge in modern software toolchain construction. This paper presents a work-in-progress multi-agent system that automatically generates production-ready Jinja2 templates from a textX grammar, natural language requirements and sample model instances. The architecture decomposes the generation task into seven stages orchestrated by eleven specialized agents, employing deterministic runtime introspection to provide ground-truth structural data. To ensure reliability, the generation process is coupled with a rigorous three-level deterministic validation loop that evaluates template syntax, rendering execution and target-language correctness without relying on self-assessment by the language models. We demonstrate the pipeline on two structurally versatile domains, specifically a recursive calculator and a declarative smart home automation language, illustrating its ability to produce functional templates, rendered code and test artifacts across diverse grammar paradigms.