🤖 AI Summary
Jupyter notebooks are widely adopted in data science for exploratory development but suffer from weak software engineering practices, hindering reliable migration to production. To address this, we propose the first multi-agent system (MAS) specifically designed for notebook refactoring, comprising three coordinated roles—Architect, Developer, and Structure—that jointly perform end-to-end, architecture-consistent code transformation grounded in a shared dependency tree. Our approach integrates static program analysis, semantic-aware dependency modeling, and structured code generation to ensure semantics-preserving refactoring while preserving computational logic. Experimental evaluation demonstrates significant improvements in code quality—including maintainability and modularity—and effectively bridges the gap between prototyping and production deployment. The system provides a scalable, verifiable, and automated paradigm for engineering data science workflows.
📝 Abstract
The increasing adoption of Jupyter notebooks in data science and machine learning workflows has created a gap between exploratory code development and production-ready software systems. While notebooks excel at iterative development and visualization, they often lack proper software engineering principles, making their transition to production environments challenging. This paper presents Codelevate, a novel multi-agent system that automatically transforms Jupyter notebooks into well-structured, maintainable Python code repositories. Our system employs three specialized agents - Architect, Developer, and Structure - working in concert through a shared dependency tree to ensure architectural coherence and code quality. Our experimental results validate Codelevate's capability to bridge the prototype-to-production gap through autonomous code transformation, yielding quantifiable improvements in code quality metrics while preserving computational semantics.