Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

AI-Powered Architecture Refactoring: From Legacy Systems to Modern Patterns

Author 1: Mohamed El BOUKHARI Author 2: Nassim KHARMOUM Author 3: Soumia ZITI
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 16, No. 12 · Published 2025

DOI: 10.14569/IJACSA.2025.0161251

Abstract

This study explores the integration of artificial intelligence (AI), especially large language models (LLMs), into software engineering, particularly the architecture refactoring process, focusing on automated command-query classification for legacy systems transitioning to the Command Query Responsibility Segregation (CQRS) pattern. We present Airchitect, a modular system. NET-based tools that orchestrate legacy code analysis, LLM-driven classification, CQRS artifact generation, and automated test creation are also available. Based on the CodeLlama model, Airchitect achieved a 16x–40x reduction in classification time compared to expert manual methods while maintaining over 85% classification accuracy. A test case involving N-tier legacy classes demonstrated the model’s ability to decompose and modularize the methods into CQRS-aligned components. Despite these gains, the study highlights key limitations: the need for human validation in complex or ambiguous cases, dependence on high-quality labeled datasets, and variability of legacy patterns that challenge rule-based automation. The results suggest that LLMs, when embedded in structured tools like Airchitect, can significantly accelerate modernization workflows—provided they are used in tandem with expert oversight.

Keywords

How to Cite this Article

BOUKHARI, M. E., KHARMOUM, N., & ZITI, S. (2025). AI-Powered Architecture Refactoring: From Legacy Systems to Modern Patterns. International Journal of Advanced Computer Science and Applications, 16(12). https://doi.org/10.14569/IJACSA.2025.0161251

BOUKHARI, Mohamed El, et al.. "AI-Powered Architecture Refactoring: From Legacy Systems to Modern Patterns." International Journal of Advanced Computer Science and Applications, vol. 16, no. 12, 2025, https://doi.org/10.14569/IJACSA.2025.0161251.

@article{BOUKHARI2025,
  title     = {AI-Powered Architecture Refactoring: From Legacy Systems to Modern Patterns},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {16},
  number    = {12},
  year      = {2025},
  publisher = {The Science and Information Organization},
  author    = {Mohamed El BOUKHARI and Nassim KHARMOUM and Soumia ZITI},
  doi       = {10.14569/IJACSA.2025.0161251},
  url       = {https://doi.org/10.14569/IJACSA.2025.0161251}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.

Call for Papers - Important Dates

Volume 17 No. 11, November 2026
Paper Submission Due October 25, 2026
Review Notification November 15, 2026
Publication Date November 30, 2026