Empowering Agile-Based Generative Software Development through Human-AI Teamwork

Sai Zhang,Zhenchang Xing,Ronghui Guo,Fangzhou Xu,Lei Chen,Zhaoyuan Zhang,Xiaowang Zhang,Zhiyong Feng,Zhiqiang Zhuang
2024-07-22
Abstract:In software development, the raw requirements proposed by users are frequently incomplete, which impedes the complete implementation of application functionalities. With the emergence of large language models, recent methods with the top-down waterfall model employ a questioning approach for requirement completion, attempting to explore further user requirements. However, users, constrained by their domain knowledge, lack effective acceptance criteria, which fail to capture the implicit needs of the user. Moreover, the cumulative errors of the waterfall model can lead to discrepancies between the generated code and user requirements. The Agile methodologies reduce cumulative errors through lightweight iteration and collaboration with users, but the challenge lies in ensuring semantic consistency between user requirements and the code generated. We propose AgileGen, an agile-based generative software development through human-AI teamwork. AgileGen attempts for the first time to use testable requirements by Gherkin for semantic consistency between requirements and code. Additionally, we innovate in human-AI teamwork, allowing users to participate in decision-making processes they do well and enhancing the completeness of application functionality. Finally, to improve the reliability of user scenarios, a memory pool mechanism is used to collect user decision-making scenarios and recommend them to new users. AgileGen, as a user-friendly interactive system, significantly outperformed existing best methods by 16.4% and garnered higher user satisfaction.
Software Engineering,Human-Computer Interaction
What problem does this paper attempt to address?
The problem that this paper attempts to solve is that during the software development process, the requirements proposed by users are usually incomplete, which hinders the complete implementation of software functions. Although existing methods complete requirements analysis through questioning, due to users' limited domain knowledge, these methods are often unable to effectively establish acceptance criteria, resulting in differences between the generated code and user requirements. In addition, the traditional waterfall model is prone to error accumulation, making the final generated code inconsistent with user requirements. To address these problems, the paper proposes an artificial intelligence - collaborative generative software development framework based on the agile method - AgileGen. AgileGen fills the gap between user requirements and precise software functions by introducing the Gherkin language to supplement the acceptance criteria in user requirements. At the same time, it also designs an interaction bridge to convert the Gherkin language into natural - language scenarios, reducing users' knowledge barriers and emphasizing the advantages of users in decision - making processes such as requirement proposal, clarification, and iterative acceptance. Finally, AgileGen participates in the subsequent visual design stage by converting user decision - making scenarios back into the Gherkin language and generates a consistency factor to ensure that the generated code is consistent with user requirements. Specifically, the main innovations of AgileGen include: 1. **Methodology level**: Propose a human - machine collaborative generative software development method, emphasizing human participation at the beginning (scenario decision - making) and end (acceptance and recommendation decision - making) of each iteration, with intermediate steps completed by AI agents. This method is different from fully automated generation methods, can reduce the error accumulation of large - language models, and also reduces the requirements for users' professional knowledge. 2. **Software design level**: For the first time, introduce the core concepts and processes of behavior - driven development (BDD) into generative agents, use the Gherkin language of BDD to generate user scenarios and complete acceptance criteria, thereby filling the gap between incomplete user requirements and precise software functions. 3. **Design and implementation level**: Expand the concept of the AI chain to form an agent graph composed of carefully designed prompts, which are connected into a directed cyclic graph. The agent graph includes human decision - making points for iterative processes within the cycle. In addition, introduce a memory pool to collect human decision - making results and recommend them to future tasks with similar requirements, forming a self - updating cycle. Through these innovations, AgileGen aims to improve the efficiency and user experience of generative software development and ensure that the generated software can better meet user requirements.