The Shift from Writing to Pruning Software: A Bonsai-Inspired IDE for Reshaping AI Generated Code
Raula Gaikovina Kula, Christoph Treude
TL;DR
AI-generated code introduces hallucinations and lacks transparent provenance within conventional, static-file IDEs. The authors propose a Bonsai-inspired AI-native IDE that treats code as a dynamic graph of snippets, navigable by intent, with parallel branching and code morphing to support controlled evolution. The work offers a conceptual framework that maps Bonsai aesthetics to software development, advocates for prompt-driven navigation, and outlines a research agenda across provenance, navigation, regeneration constraints, multi-generation exploration, continuous regeneration pipelines, sandboxing, and human-AI collaboration. This approach aims to improve trust, traceability, and maintainability in AI-assisted software engineering by enabling continual refinement and principled management of AI-generated code.
Abstract
The rise of AI-driven coding assistants signals a fundamental shift in how software is built. While AI coding assistants have been integrated into existing Integrated Development Environments (IDEs), their full potential remains largely untapped. A key challenge is that these AI assistants can suffer from hallucinations, leading developers down decision paths that the AI should not dictate, sometimes even without the users awareness or consent. Moreover, current static-file IDEs lack the mechanisms to address critical issues such as tracking the provenance of AI-generated code and integrating version control in a way that aligns with the dynamic nature of AI-assisted development. As a result, developers are left without the necessary tools to manage, refine, and validate AI generated code systematically, making it difficult to ensure correctness, maintainability, and trust in the development process. Existing IDEs treat AI-generated code as static text, offering limited support for managing its evolution, refinement, or multiple alternative paths. Drawing inspiration from the ancient art of Japanese Bonsai gardening focused on balance, structure, and deliberate pruning: we propose a new approach to IDEs, where AI is allowed to generate in its true, unconstrained form, free from traditional file structures. This approach fosters a more fluid and interactive method for code evolution. We introduce the concept of a Bonsai-inspired IDE, structured as a graph of generated code snippets and multiple code paths, enabling developers to reshape AI generated code to suit their needs. Our vision calls for a shift away from a static file based model toward a dynamic, evolving system that allows for continuous refinement of generated code, with the IDE evolving alongside AI powered modifications rather than merely serving as a place to write and edit code.
