AI-assisted software development method and storage medium

CN122672774APending Publication Date: 2026-09-01VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610769916.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-29
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

[0004]然而,采用上述软件开发方式交付的软件,存在与实际需求偏离和返工浪费问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122672774A_ABST
    Figure CN122672774A_ABST
Patent Text Reader

Abstract

This application provides an AI-assisted software development method and storage medium, relating to the field of software development technology. By parsing a task request, the task type of the corresponding software development task is obtained. If the task type is a creative task, based on the task request, the user's confirmed target requirements for the software development task are obtained, ensuring the development starting point matches the user's actual needs. Based on the target requirements, a design scheme for the software development task is generated, and according to the progressive implementation logic of software development, the design scheme is divided into multiple design stages, and the design content of each stage is displayed sequentially to obtain the user's confirmation results for the design content. This ensures the design content aligns with real business requirements and technical specifications, further meeting the user's actual needs in the design phase. Based on the confirmation results, the software code for the software development task is generated to ensure the software development process matches actual needs and reduces rework waste.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software development technology, and in particular to an AI-assisted software development method and storage medium. Background Technology

[0002] In the field of software development, traditional development models require developers to handle multiple tasks simultaneously, including requirements analysis, architecture design, code implementation, testing and verification, and documentation maintenance. With the exponential increase in software complexity, this leads to problems such as long development cycles and high costs associated with manual development. Artificial intelligence (AI)-assisted software development, however, can quickly respond to changes in requirements and generate preliminary implementation plans, making it an important means of improving development efficiency.

[0003] In related technologies, AI-assisted software development mainly uses Natural Language Processing (NLP) technology to analyze user needs and generate software development tasks. Then, it uses finite state automata to dynamically orchestrate and schedule resources for the software development tasks. It leverages multi-specialized intelligent agents to complete collaborative development and uses a template matching mechanism to intelligently verify the development results. After verification, it automatically completes packaging, deployment, and delivery, realizing a complete automated closed loop from requirements to delivery.

[0004] However, software delivered using the above-mentioned software development methods often deviates from actual needs and results in rework and waste. Summary of the Invention

[0005] This application provides an AI-assisted software development method and storage medium to ensure that the software development process matches actual needs and reduces rework waste.

[0006] Firstly, this application provides an AI-assisted software development method, including:

[0007] Parse the task request to obtain the task type of the software development task corresponding to the task request;

[0008] If the software development task is a creative task, obtain the user's confirmed target requirements for the software development task based on the task request.

[0009] Based on the target requirements, a design scheme for the software development task is generated. According to the progressive implementation logic of software development, the design scheme is divided into the design content of multiple design stages, and the multiple design stages correspond to different technical functional modules in the software development task.

[0010] The design content from multiple design stages is displayed sequentially to obtain user confirmation of the design content;

[0011] Based on the confirmation results, the software code for the software development task is generated.

[0012] In one possible implementation, obtaining the user's confirmed target requirements for the software development task includes:

[0013] Obtain project-related information relevant to software development tasks;

[0014] Based on the task request and project-related information, questions are asked to determine the user's target requirements for the software development task.

[0015] In one possible implementation, based on the task request and project-related information, the user's target requirements for the software development task are determined through a questioning approach, including:

[0016] Based on the task request and project-related information, the development requirements are clarified by asking users questions one by one until the task objectives, constraints, and success criteria of the software development task are clearly defined, thus obtaining the target requirements.

[0017] In one possible implementation, a design scheme for the software development task is generated based on the target requirements, including:

[0018] Based on the target requirements, we recommend multiple implementation schemes for the software development task and the reasons for recommending each scheme.

[0019] Obtain the solution chosen by the user from multiple implementation options, and use it as the design scheme for the software development task.

[0020] In one possible implementation, based on the confirmation results, software code for the software development task is generated, including:

[0021] Based on the confirmation results, generate design documents for the software development tasks;

[0022] Analyze the content structure of the design document and decompose it into multiple executable atomic tasks according to the smallest executable granularity;

[0023] A test-driven development loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks.

[0024] After multiple atomic tasks are completed, the software code for the software development task is obtained based on the software code corresponding to the atomic tasks.

[0025] In one possible implementation, the test-driven development cycle includes the following phases:

[0026] Red Phase: Write failure test cases for the target functionality corresponding to the atomic task;

[0027] First verification phase: Run the test cases that failed to confirm that the test failed due to missing functionality;

[0028] Green phase: Write the minimum implementation code that will make the tests pass;

[0029] The second verification phase involves running the test implementation code to confirm that the test passes and other tests are not violated, thus obtaining the software code corresponding to the atomic task.

[0030] In one possible implementation, the test-driven development cycle also includes the following phases:

[0031] Refactoring phase: Optimize the code structure of the implementation code, provided that the tests pass.

[0032] In one possible implementation, before breaking down the design document into multiple executable atomic tasks, the following steps are also included:

[0033] Invoke the first review agent to conduct a standardization review of the design documents;

[0034] If problems are found during the review, they will be fixed and reviewed again until the review is passed.

[0035] In one possible implementation, after obtaining the software code corresponding to the atomic task, the method further includes:

[0036] Submit the software code and test code corresponding to the atomic task to the version control system to obtain the code review results. The version control system is used to call the second review agent to review the submitted code. The code review results include specification compliance review results and code quality review results. The specification compliance review results indicate whether the submitted code conforms to the design specifications in the design document. The code quality review results indicate whether the style of the submitted code conforms to the preset coding specifications, whether there are potential problems, and the test coverage.

[0037] If the code review result indicates that the review has passed, then the corresponding atomic task is marked as completed.

[0038] In one possible implementation, the AI-assisted software development method provided in this application further includes:

[0039] During the execution of atomic tasks, detect whether there is any blockage;

[0040] If a blockage is detected, the corresponding handling measures shall be taken according to the type of blockage:

[0041] If the blocking type is missing information, re-execute after supplementing the relevant information;

[0042] If the blocking type is that the task complexity is greater than the complexity threshold, the atomic task is split into atomic subtasks and executed.

[0043] If the blocking type indicates a problem with the design, notify manual intervention.

[0044] In one possible implementation, prior to performing the atomic task, the following is also included:

[0045] It offers multiple working modes, which are used to constrain the development environment;

[0046] Obtain the user's target work mode selected from multiple work modes;

[0047] The test-driven development loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks. This includes: in the target working mode, the test-driven development loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks.

[0048] In one possible implementation, multiple working modes include isolated working tree mode, new branch mode, and current branch mode. Isolated working tree mode means creating a new working tree in an independent directory outside the project directory corresponding to the software development task. New branch mode means creating a new branch in the project directory corresponding to the software development task. Current branch mode means working on the current branch corresponding to the software development task.

[0049] In one possible implementation, under the target working mode, a test-driven development loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks, including:

[0050] If the target working mode is isolated working tree mode, check if a preset working tree directory exists; if not, create the working tree at the creation location confirmed by the user for the atomic task and switch to the first new branch; perform project dependency installation and initialization on the first new branch; run baseline tests to ensure the baseline status is normal; after the tests pass, under the first new branch, use the test-driven development loop to execute the atomic task and obtain the software code corresponding to the atomic task;

[0051] If the target working mode is the new branch mode, create and switch to the second new branch in the project directory, and perform project dependency installation and initialization on the second new branch; and, under the second new branch, use the test-driven development loop to execute atomic tasks and obtain the software code corresponding to the atomic tasks;

[0052] If the target working mode is the current branch mode, then under the current branch, the test-driven development loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks.

[0053] In one possible implementation, after generating the software code for the software development task based on the confirmation results, the process further includes:

[0054] The third-party review agent is invoked to perform quality verification on the software code of the software development task according to the task type. The quality verification includes integrity verification, code review and document synchronization check. Integrity verification is used to verify whether the software development task has been completed. Code review is used to review the software code that has been changed. Document synchronization check is used to verify the synchronization between software code changes and design document changes based on the relationship between software code and design documents.

[0055] If the quality verification passes, the software development task is declared complete.

[0056] In one possible implementation, after declaring the software development task complete, the following is also included:

[0057] It offers multiple cleanup methods, including local merge, push code, keep branch status, and discard work. Local merge is used to merge the changed software code locally into the base branch corresponding to the software development task. Push code is used to push the changed software code to the code review system. Keep branch status is used to retain the branches and software code of the software development task. Discard work is used to discard the branches and software code of the software development task.

[0058] Based on the user-selected closing method, perform the closing operations for the software development task.

[0059] In one possible implementation, the AI-assisted software development method provided in this application further includes:

[0060] If the software development task is a debugging task, a multi-stage debugging process is executed for the software development task. The multi-stage debugging process includes the root cause investigation phase, pattern analysis phase, hypothesis testing phase, and fix implementation phase, wherein:

[0061] During the root cause investigation phase, error messages and stack traces are analyzed to pinpoint the root cause of the failure.

[0062] During the pattern analysis phase, the differences between working code and fault code are compared. Working code is code in the code library that has a similar function to the code to be debugged.

[0063] In the hypothesis testing phase, root cause hypotheses are formed based on the differences and root causes of failures, and then the root cause hypotheses are tested.

[0064] During the remediation implementation phase, based on the failed test cases that can reproduce the problem, remediation code is obtained for the root cause hypothesis, and the test remediation code is run to verify the effectiveness of the remediation.

[0065] In one possible implementation, the AI-assisted software development method provided in this application further includes:

[0066] If there are multiple independent software development tasks, create an independent execution environment for each software development task and call an independent execution agent for each software development task to execute each software development task in parallel. Independent software development tasks mean that each software development task involves different files or subsystems, the repair of each software development task does not affect each other, and there is no shared state between each software development task.

[0067] After all software development tasks are completed, the execution results of the corresponding execution agents for each software development task are collected, and the conflict between the software development tasks is checked based on the execution results.

[0068] If there are no conflicts, retrieve the project's complete test suite and run full tests on the merged execution results to verify the effectiveness of the fix collaboration;

[0069] If the full test passes, it confirms that multiple independent software development tasks were successfully processed in parallel.

[0070] In one possible implementation, the AI-assisted software development method provided in this application further includes:

[0071] Based on the feedback from the review agent, the corresponding requirements are restated to the reviewer using standardized technical language. The restatement process is based on technical facts. The review agent is used to review at least one of the following: code quality and code changes.

[0072] If the reviewer indicates that the feedback is incorrect, then verify the accuracy of the feedback by comparing it with the codebase of the current project.

[0073] If the reviewer indicates that there is a better alternative, then, taking into account the actual technology of the project, we will evaluate whether the alternative is suitable for the codebase.

[0074] If the reviewer confirms that the feedback is correct, then implement the corrective measures and verify them accordingly.

[0075] If the reviewing party indicates that there are technical issues in the feedback, provide technical evidence to rationally refute the claims.

[0076] In one possible implementation, the AI-assisted software development method provided in this application further includes:

[0077] If the software development task is a query and retrieval task, the relevant information of the software development task will be retrieved and fed back to the user. Query and retrieval tasks include simple queries or information retrieval.

[0078] Secondly, this application provides an AI-assisted software development device, comprising:

[0079] The task entry processing module is used to parse task requests and obtain the task type of the software development task corresponding to the task request;

[0080] The design analysis module is used to generate design schemes for software development tasks based on target requirements, and divide the design schemes into multiple design stages according to the progressive implementation logic of software development. Each design stage corresponds to a different technical functional module in the software development task. The module also displays the design content of each design stage in sequence to obtain user confirmation of the design content.

[0081] The code generation module is used to generate software code for software development tasks based on the confirmation results.

[0082] Thirdly, this application provides a computing device, including: a memory and a processor;

[0083] The memory stores instructions that the computer executes;

[0084] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0085] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a device such as a processor, are used to implement the first aspect and / or various possible embodiments of the first aspect.

[0086] Fifthly, this application provides a computer program product, including a computer program that, when executed by a device such as a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0087] The AI-assisted software development method and storage medium provided in this application parse task requests to obtain the task type of the software development task corresponding to the task requirements. If the task type is a creative task, the method obtains the user's confirmed target requirements for the software development task based on the task requirements, ensuring that the development starting point matches the user's actual needs. Based on the target requirements, a design scheme for the software development task is generated, and the design scheme is divided into multiple design stages according to the progressive implementation logic of software development. The design content of each stage is displayed sequentially to obtain the user's confirmation results. This phased verification effectively alleviates the deviation between the design stage and the user's actual needs, reduces subsequent rework waste caused by overall design deviations, and ensures that code development further meets the user's actual needs in the design stage. Based on the confirmation results, the software code for the software development task is generated. The entire process from requirement analysis and design generation to code development realizes the confirmation and implementation of the user's actual needs, ensuring that the software development process matches actual needs and reducing rework waste. Attached Figure Description

[0088] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0089] Figure 1 A flowchart illustrating the AI-assisted software development method provided in this application embodiment;

[0090] Figure 2 A schematic diagram illustrating an application of the AI-assisted software development method provided in this application embodiment;

[0091] Figure 3 A schematic diagram of the structure of the AI-assisted software development apparatus provided in the embodiments of this application;

[0092] Figure 4 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application.

[0093] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0094] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0095] The inventors' research revealed that existing AI-assisted software development methods achieve full-process automation, significantly reducing human intervention and greatly improving development efficiency. Furthermore, through multi-agent collaboration, they ensure professionalism and decision-making quality at each stage, overcoming the limitations of single agents. Simultaneously, state machine management provides flexible and reliable process control, dynamically adapting to changes in development status, and template verification ensures consistent delivery standards. However, in existing AI-assisted software development methods, AI often directly writes software code without fully understanding requirements and completing the design phase. This lack of a design phase, jumping directly from requirements to code implementation, leads to implementations deviating from requirements or requiring multiple reworks. In other words, software delivered using these methods suffers from deviations from actual needs and wasteful rework.

[0096] To overcome the above limitations, this application provides an AI-assisted software development method. By determining that the software development task is a creative task, a corresponding design scheme is generated based on the user-confirmed target requirements. The design scheme is then divided into multiple design stages according to the progressive implementation logic of software development and displayed sequentially. The user's confirmation results for the design content are obtained, and software code corresponding to the software development task is generated based on the confirmation results. This ensures that the software development process matches actual needs and reduces rework waste.

[0097] This application applies to high-reliability software development scenarios, such as the development and maintenance of complex software systems like autonomous driving systems, vehicle networking platforms, and industrial control systems. In these scenarios, software functions must strictly adhere to safety specifications, such as road vehicle functional safety specifications and automotive software process improvement and capability assessment specifications. Furthermore, the development process involves complexities such as multi-module collaboration, frequent requirement iterations, and parallel development of multiple versions. AI-assisted development must ensure functional correctness while meeting engineering constraints such as documentation consistency, test coverage, and debugging traceability. For example, in the development of autonomous driving systems, AI needs to generate control logic code based on requirements and ensure that the code is updated synchronously with safety documentation, while simultaneously verifying functional safety through test cases.

[0098] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0099] Figure 1 This is a flowchart illustrating an AI-assisted software development method provided in an embodiment of this application. Figure 1 As shown, the AI-assisted software development method includes:

[0100] S101. Parse the task request to obtain the task type of the software development task corresponding to the task request.

[0101] It is understandable that a task request refers to a development requirement or problem description entered by the user through natural language, such as "add vehicle power distribution function".

[0102] For example, in the task entry processing stage, after receiving the task request from the user, NLP technology can be used to perform multi-dimensional analysis of the task request. Through core technologies such as text segmentation, semantic understanding, and intent recognition, key information and core requirements within the task request can be obtained. Based on this key information and core requirements, and using judgment rules within a pre-defined standardized skills system, the task type corresponding to the task request can be determined. By determining the task type, it can be determined whether the software development task is suitable for a pre-defined execution process.

[0103] For example, if a task request contains the word "add", then the corresponding software development task is determined to be a creative task.

[0104] Optionally, task types may include creative tasks, debugging tasks, and query retrieval tasks.

[0105] It is understandable that a standardized skills system refers to a pre-defined rule base used to define the execution process corresponding to different task types. For example, creative tasks require a design analysis phase, while debugging tasks require a debugging process.

[0106] It's important to note that a standardized skills system can also determine the execution priority of various skills required to perform corresponding software development tasks, with process-related skills taking precedence over implementation-related skills. For example, in creative tasks, AI can only proceed to the code implementation phase after obtaining user confirmation during the design analysis phase.

[0107] S102. If the task type of the software development task is a creative task, obtain the target requirements confirmed by the user for the software development task based on the task request.

[0108] For example, if a software development task involves developing new features or creating components, the task type is determined to be a creative task, and it proceeds to the design analysis phase. For instance, if the task requirement is "to add a vehicle power distribution function," it is determined to be a creative task after analysis and must proceed to the design analysis phase. It can be understood that a creative task refers to a functional development task that requires design analysis to achieve, such as adding a new module.

[0109] During the design analysis phase, requirements are confirmed based on the core demands expressed in the task request. Specifically, based on the task request, relevant requirements information such as user expectations for the creative task, business logic, application scenarios, and performance indicators are collected. After integration, a clear set of requirements is formed and fed back to the user. Once confirmed by the user, the user-confirmed target requirements serve as the core basis for subsequent work.

[0110] S103. Based on the target requirements, generate a design scheme for the software development task, and divide the design scheme into multiple design stages according to the progressive implementation logic of software development. Each design stage corresponds to a different technical functional module in the software development task.

[0111] For example, during the design analysis phase, after obtaining the user's confirmed target requirements for the software development task, AI technology is applied to generate a design scheme tailored to the software development task based on these requirements. Optionally, the design scheme may include specific details such as functional architecture, module division, logical flow, technology selection, and interaction design.

[0112] Furthermore, following the progressive implementation logic of software development from initial planning to final implementation, the design scheme is systematically decomposed and broken down. The complete design content corresponding to the design scheme is broken down into multiple sequential, progressively advancing, and independent design stages. Each design stage corresponds to a clearly defined and independent technical functional module within the software development task.

[0113] For example, multiple design phases can include overall architecture design phase, business function design phase, interface interaction design phase, data structure design phase, unit test design phase, and deployment adaptation design phase, so that each design phase focuses on a single dimension of technical design work, improving the misunderstanding and development misalignment problems caused by the complexity of the overall design content.

[0114] S104. Display the design content of multiple design stages in sequence to obtain user confirmation of the design content.

[0115] In this step, after dividing the design scheme into design content for multiple design stages, the design content of each design stage is presented in the order of the software development implementation. After the design content of each design stage is presented, the user is asked to confirm and provide feedback on the design content. The design content is then adjusted based on the feedback until the design content of the current design stage meets the user's needs and receives clear confirmation from the user.

[0116] After user confirmation of a single design phase is completed, the design content of the next design phase is displayed. The process of displaying, verifying, and confirming each phase is repeated until the content of each design phase has been reviewed and confirmed by the user. Finally, the user's confirmation of the design content is obtained, ensuring that each part of the design content is highly matched with the user's actual needs. This reduces requirement deviations and design omissions from the design phase and effectively reduces repeated modifications and rework in the subsequent development phases.

[0117] S105. Based on the confirmation results, generate the software code for the software development task.

[0118] In this step, after obtaining the user's confirmation of the design content, AI technology is used to automatically generate software code adapted to the software development task during the task execution phase. During code development, it is necessary to proceed based on the various standards outlined in the confirmation results to ensure that the generated software code is compatible with the confirmation results and to guarantee consistency between software development and actual requirements.

[0119] The AI-assisted software development method provided in this application parses task requests to obtain the task type of the software development task corresponding to the task requirements. If the task type is a creative task, the method obtains the user's confirmed target requirements for the software development task based on the task requirements, ensuring that the development starting point matches the user's actual needs. Based on the target requirements, a design scheme for the software development task is generated. Following the progressive implementation logic of software development, the design scheme is divided into multiple design stages, and the design content of each stage is displayed sequentially to obtain the user's confirmation results. This phased verification effectively mitigates the deviation between the design stage and the user's actual needs, reduces subsequent rework waste caused by overall design deviations, and ensures that code development further meets the user's actual needs in the design stage. Based on the confirmation results, the software code for the software development task is generated. From requirement analysis and design generation to code development, the entire process realizes the confirmation and implementation of the user's actual needs, ensuring that the software development process matches actual needs and reducing rework waste.

[0120] Based on the above embodiments, S102, obtaining the target requirements confirmed by the user for the software development task, may further include: obtaining project-related information related to the software development task; and determining the target requirements confirmed by the user for the software development task by asking questions based on the task request and project-related information.

[0121] For example, during the design analysis phase, project-related information relevant to the software development task is obtained, including analyzing the project file structure, reading relevant documents, and checking recent code commit records, in order to provide basic information for subsequent design.

[0122] Furthermore, taking the user-initiated task request as the starting point for requirements, combined with the obtained project-related information and the development direction of the software development task, the user is asked questions about the relevant requirements of the software development task. This guides the user to clearly express potential or unmentioned personalized needs, determines the user's development requirements for the software development task, and obtains the user's confirmed target requirements for the software development task after confirmation and feedback from the user.

[0123] This implementation method determines the target requirements based on task requests and project-related information by asking questions. This ensures that the obtained target requirements not only meet the user's personalized development needs but also adapt to the overall project construction requirements, thereby guaranteeing the accuracy of the requirements and alleviating the problem of subsequent development being out of touch with actual needs due to vague requirements and cognitive biases.

[0124] Optionally, based on the task request and project-related information, the target requirements confirmed by the user for the software development task can be determined by asking questions. This may include clarifying the development requirements by asking the user questions one by one based on the task request and project-related information, until the task objectives, constraints and success criteria of the software development task are clearly defined, and thus the target requirements are obtained.

[0125] In this implementation, during the design analysis phase, user-initiated task requests serve as the starting point for requirements analysis. Combined with acquired project-related information, targeted questions are posed to the user one by one to address vague, incomplete, or ambiguous aspects of the task requests. This involves asking only one question at a time to clarify development requirements and gradually define the task objectives, constraints, and success criteria for the software development task. Task objectives may include, for example, the core functions to be implemented, business value, and implementation results; constraints may include, for example, technology selection limitations, performance requirements, integration rules with existing modules, and development cycle and resource boundaries; success criteria may include, for example, core acceptance dimensions such as functional acceptance requirements, performance thresholds, and business scenario adaptability.

[0126] Furthermore, the requirements were adapted and sorted out in combination with the actual development conditions of the project, and finally the software development task objectives and requirements that were formally confirmed by the user, complete in content, clearly defined in boundaries and adapted to the current status of the project were determined, so as to provide accurate and reliable requirements basis for subsequent solution design and code development.

[0127] Furthermore, S103, generating a design scheme for the software development task based on the target requirements, may further include: recommending multiple implementation schemes corresponding to the software development task based on the target requirements and the reasons for recommending the implementation schemes; obtaining the scheme selected by the user from the multiple implementation schemes as the design scheme for the software development task.

[0128] For example, during the design analysis phase, based on an understanding of the target requirements, various feasible implementation solutions are recommended to the user from the perspectives of different technical paths and implementation approaches, such as recommending 2-3 solutions. Combining the core requirements of the target needs, a comprehensive and objective analysis and weighing of each implementation solution is conducted from multiple dimensions, including technical feasibility, development efficiency, resource costs, and compatibility with the existing project system. The core advantages, applicable scenarios, and potential limitations of each implementation solution are clarified, and corresponding reasons for recommendation are given.

[0129] Furthermore, the recommended implementation schemes and their corresponding reasons will be synchronized to the users, who can then choose the appropriate scheme from the multiple implementation schemes based on their actual development needs, project construction plans, and resource allocation, as the design scheme for the software development task.

[0130] Based on the target requirements, multiple implementation schemes corresponding to the software development task are recommended, and the user can choose the design scheme from them. This can ensure that the design scheme is highly matched with the user's development needs and alleviate the problems of development deviation, resource waste and subsequent rework caused by improper selection of technical path.

[0131] In some embodiments, step S105, generating software code for the software development task based on the confirmation result, may further include: generating a design document for the software development task based on the confirmation result; parsing the content structure of the design document and decomposing it into multiple executable atomic tasks according to the smallest executable granularity; executing the atomic tasks using a test-driven development (TDD) cycle to obtain the software code corresponding to the atomic tasks; and obtaining the software code for the software development task based on the software code corresponding to the atomic tasks after all atomic tasks have been completed.

[0132] In this embodiment, based on the user's confirmation of the design content, a design document adapted to the software development task is generated according to standardized design document writing specifications and structural requirements. This design document can reproduce the core requirements of the target design content at each stage and determine the design standards, implementation paths, and technical constraints corresponding to the software development task. Optionally, the design document can be stored in a preset document directory, and the document naming can follow the format of "date-subject-design". Here, "design" indicates that the document is a design document.

[0133] Because existing technologies lack standardized processes for AI to execute development tasks, resulting in inconsistent code quality, the following solutions are proposed to address these limitations:

[0134] The generated design document is parsed to identify the various technical design elements and business implementation units it contains, including architecture, functional logic, data structures, interface definitions, exception handling, and testing specifications. Based on the execution logic of software development and the principle of minimum executable granularity, the design document is decomposed, subdivided, and categorized layer by layer, resulting in multiple independently executable atomic tasks. Each atomic task includes: a task objective description, a list of files to be created or modified, and specific execution steps, including testing, implementation, and submission steps. In essence, an atomic task is the smallest independently executable task unit.

[0135] Furthermore, during the task execution phase, the aforementioned atomic tasks are extracted, and a task tracking list is established based on each atomic task. For each atomic task in the task tracking list, a TDD loop is used to execute each atomic task, ensuring that the development results of each atomic task meet the design requirements and possess high standardization, ultimately yielding the software code corresponding to each atomic task. It can be understood that the task tracking list is a structured record of task execution status, including task objectives, status, and dependencies. The status can be pending execution, in progress, or completed.

[0136] Optionally, after multiple atomic tasks have been developed and their corresponding code has been generated, the software code of each atomic task is integrated, debugged, and tested in accordance with the pre-defined functional architecture, module connection logic, and code integration specifications in the design document to ensure the functional integrity, logical coherence, and operational stability of the overall code, and finally integrated to obtain software code adapted to the software development task.

[0137] By breaking down design documents into atomic tasks and executing those tasks, the overall development risk can be effectively reduced, and code quality and development efficiency can be improved.

[0138] As one possible implementation, the TDD cycle can include the following phases: Red phase: Write failure test cases for the target function corresponding to the atomic task; First verification phase: Run the failure test cases to confirm that the test failed due to the missing function; Green phase: Write the minimal implementation code that makes the test pass; Second verification phase: Run the test implementation code to confirm that the test passed and that other tests were not broken.

[0139] Because existing technologies lack test-driven constraints when AI executes development tasks, resulting in insufficient test coverage in the generated code, this paper proposes using a TDD (Test-Driven Development) loop to execute atomic tasks during the task execution phase. The TDD loop can include the following stages: the red stage, the first verification stage, the green stage, and the second verification stage.

[0140] For example, in the red phase, write failure test cases for the target function corresponding to the atomic task to ensure that the test cases effectively cover the functional requirements. It can be understood that failure test cases are test cases designed for the target function that are expected to fail, used to verify the correctness of the code implementation.

[0141] In the first verification phase, test cases that fail are run, and the actual execution results confirm that the test fails due to the lack of the target function, thereby verifying the effectiveness of the test cases.

[0142] During the green phase, write the minimum implementation code that will pass the tests, ensuring that the code implementation strictly corresponds to the test cases, without doing any redundant development beyond the functional requirements, ensuring that code development focuses on the target function, and reducing ineffective development costs.

[0143] In the second verification phase, the test implementation code is run to confirm that the target function implementation code can make the test cases pass accurately. At the same time, it is verified that this development has not damaged other existing functions or test cases in the project, so as to ensure the compatibility of the code development and the overall stability of the project.

[0144] Alternatively, the above process can be implemented by test cases driving the code, ensuring a strong correlation between the code and the test cases.

[0145] By using the TDD cycle, we ensure that the code generation process is always tied to test cases, thus mitigating code defects caused by the lack of tests.

[0146] Optionally, the TDD cycle may also include the following phases: Refactoring phase: Optimize the code structure of the implementation code, provided that the tests pass.

[0147] During the refactoring phase, provided that the tests pass, and without changing the core functionality of the implementation code or affecting the execution results of the test cases, the code structure is optimized in a targeted manner. This includes simplifying code logic, eliminating redundant code, standardizing variable and method naming, and improving code reusability, thereby enhancing the maintainability of the implementation code.

[0148] The introduction of the refactoring phase can further improve the readability and maintainability of the code and reduce the cost of subsequent modifications.

[0149] In one possible implementation, before breaking down the design document into multiple executable atomic tasks, it may also include: invoking a first review agent to perform a normative review of the design document; if the review finds problems, they are fixed and then reviewed again until the review is passed.

[0150] For example, during the design analysis phase, after generating the design documents for the software development task, a first review agent is invoked to conduct a standardization review of the design documents. Optionally, the first review agent can be an AI or an independent review agent, used to verify whether the design documents meet the standardization requirements.

[0151] Specifically, the first review agent, based on the software development industry's generally accepted design document preparation standards, the project's established document management standards, and the target requirements and design requirements of the software development task, conducts a standardization review of the generated design documents from multiple core dimensions, including the overall structural integrity of the design documents, the accuracy of content description, the coherence of logical links, the standardization of technical terminology, the rationality of module division, and the consistency between functional design and target requirements. The agent checks each design document for various standardization issues such as structural deficiencies, vague descriptions, logical contradictions, misuse of terminology, unclear module boundaries, or a disconnect between the design content and the user's confirmed target requirements, ensuring that the design meets the requirements constraints.

[0152] If the first review agent finds any of the above-mentioned problems in the design document during the review process, the design document shall be repaired according to the specific problem location, problem type and targeted rectification suggestions. After the repair is completed, the design document shall be resubmitted to the first review agent for standardization review until the review is passed, to ensure that the design document meets all standard requirements, to lay a standardized and reliable document foundation for the decomposition of atomic tasks and subsequent standardized development, and thus improve the smoothness of the overall development process and the accuracy of development results.

[0153] Optionally, after obtaining the software code corresponding to the atomic task, the process may further include: submitting the software code and test code corresponding to the atomic task to the version control system to obtain code review results. The version control system is used to call a second review agent to review the submitted code. The code review results include specification compliance review results and code quality review results. The specification compliance review results indicate whether the submitted code conforms to the design specifications in the design document. The code quality review results indicate whether the style of the submitted code conforms to the preset coding standards, whether there are potential problems, and the test coverage. If the code review results indicate that the review has passed, the corresponding atomic task is marked as completed.

[0154] For example, during the task execution phase, after obtaining the software code corresponding to the atomic task, the software code and test code corresponding to the atomic task are submitted to the version control system. That is, the software code produced during the development of the atomic task and the accompanying test code, such as failure test cases, are submitted. The version control system automatically calls the second review agent to conduct automated code review on the submitted code.

[0155] Optionally, automated code review can include specification compliance review and code quality review. After reviewing the submitted code, code review results are obtained, including specification compliance review results and code quality review results.

[0156] For specification compliance review, the process may include: calling a second review agent to check whether the implementation content of the submitted code conforms to the design specifications in the design document, and obtaining the corresponding specification compliance review result. If a deviation is found between the implementation content of the submitted code and the design specifications in the design document, the submitted code is repaired based on this deviation and re-reviewed until the specification compliance review is passed.

[0157] Code quality reviews can include: calling a second review agent to check the quality of the submitted code, including whether the code style conforms to preset coding standards, whether there are potential problems, and test coverage, to obtain the corresponding code quality review results. If problems are found, the submitted code is fixed based on the problems and re-reviewed until the code quality review is passed.

[0158] Among them, code style refers to whether the submitted code conforms to the project's preset coding standards, such as naming, indentation, comments, and file structure; potential issues refers to whether the submitted code has syntax vulnerabilities, logical flaws, performance issues, and security vulnerabilities; test coverage is used to review test code, i.e., test cases, whether they cover core functions and boundary scenarios, and whether the test coverage rate meets the standards.

[0159] Furthermore, if the code review result indicates that the review has passed, that is, the specification compliance review result indicates that the review has passed, and the code quality review result indicates that the review has passed, then the corresponding atomic task is marked as completed.

[0160] By invoking a second review agent, the submitted code undergoes specification compliance review and code quality review, ensuring that the submitted code conforms to the design specifications in the design document and meets the corresponding quality standards. This effectively reduces subsequent integration, debugging, rework, and development cost waste caused by deviations in unit code specifications and quality defects, thus ensuring the quality and efficiency of the overall software development process.

[0161] Based on the above embodiments, the AI-assisted software development method provided in this application may further include: detecting whether there is a blockage during the execution of an atomic task; if a blockage is detected, taking corresponding processing measures according to the type of blockage; if the blockage type is missing information, supplementing the relevant information and re-executing; if the blockage type is that the task complexity is greater than the complexity threshold, splitting the atomic task into atomic subtasks and executing them; if the blockage type is that there is a problem with the design scheme, notifying manual processing.

[0162] For example, during the task execution phase, that is, during the execution of atomic tasks, the task execution status is monitored in real time to detect any blockages. If a blockage is detected, the blockage issue will be precisely determined and classified to clarify the specific blockage type. Targeted handling measures will then be matched for different blockage types. Specifically, these include:

[0163] If the blocking type is missing information, supplement and improve the required project-related information based on the development requirements of the atomic task to ensure that the information dimensions are complete and the content is accurate. After the relevant information is supplemented, restart and execute the atomic task.

[0164] If the blocking type is that the task complexity is greater than the complexity threshold, that is, the complexity of the development logic and implementation steps of a single atomic task exceeds the preset executable threshold and is difficult to complete in one go, then according to the principles of functional independence and logical correlation, the atomic task is further broken down into smaller-granularity, independently executable atomic subtasks, and then each atomic subtask is executed in sequence.

[0165] If the blocking type is due to a problem with the design scheme, such as logical contradictions or insufficient feasibility in the early design scheme that prevent the atomic task from progressing, and such problems cannot be solved automatically, a blocking notification will be sent to the relevant developers immediately. The developers will be informed of the specific problems in the design scheme and the task blocking situation, and the task will be handled manually, including professional analysis and design scheme revision. After the design scheme is optimized and improved, the atomic task will be re-executed based on the revised design scheme.

[0166] The aforementioned blockage detection and handling process, through real-time detection, precise classification, and on-demand measures, can ensure the automated advancement of the development process, effectively reduce development stagnation and efficiency losses caused by blockage issues, and ensure the reliability and efficiency of each atomic task.

[0167] Furthermore, before executing the atomic task, it may also include: providing multiple working modes, which are used to constrain the development environment; and obtaining the target working mode selected by the user from the multiple working modes.

[0168] In some embodiments, a TDD loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks. This may include: in the target working mode, a TDD loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks.

[0169] For example, in the workspace preparation phase, before executing atomic tasks, it is necessary to clarify the target working mode determined by the user for different development scenarios. Different working modes correspond to different development environment constraint rules, which can differentiate the development environment of software development from multiple dimensions such as code compilation environment, runtime dependency version, coding standard level, code verification strength, debugging permissions, log output level, and resource usage limit, so as to adapt to the needs of different development scenarios such as formal development, debugging development, lightweight rapid development, and strict standard development.

[0170] At the same time, it displays the environmental constraints, applicable scenarios, and development limitations corresponding to each working mode, allowing users to make their own selections based on the development needs, usage scenarios, and development standards of the current software development task, and obtains the target working mode selected by the user from multiple working modes in real time.

[0171] Furthermore, after determining the target working mode, during the task execution phase, atomic task development is performed under the determined target working mode. The relevant operations of the TDD cycle are restricted to the directory or branch corresponding to the target working mode, ensuring that the development operations, code files, and test cases during the development process all belong to the exclusive development environment of the target working mode. Finally, atomic tasks are executed in this environment and the corresponding software code is generated.

[0172] By acquiring the target working mode selected by the user from multiple working modes, and executing atomic tasks and generating corresponding software code in the target working mode, the system provides users with operation options that adapt to different development needs, improves the standardization and traceability of the development process, and provides the foundation for the development environment.

[0173] Optionally, multiple working modes include isolated working tree mode, new branch mode, and current branch mode. Isolated working tree mode means creating a new working tree in an independent directory outside the project directory corresponding to the software development task. New branch mode means creating a new branch in the project directory corresponding to the software development task. Current branch mode means working on the current branch corresponding to the software development task.

[0174] The isolated working tree mode means that the software development task is separated from the original project directory and a dedicated Git working tree is created in a completely new independent directory outside the project directory. All atomic task development, code modification and debugging operations are completed in the independent directory without making any changes to the code files, branch data and project configuration of the original project directory, thus achieving physical isolation between the development task and the project main directory.

[0175] The new branching mode means creating a new independent Git branch in the original project directory corresponding to the software development task. All development operations are carried out in this new branch, which can rely on the complete environment and code resources of the original project. At the same time, it can improve the problem of pollution to the original main branch and historical code of the project, realize the logical isolation between the development task and the main branch, and facilitate the merging of code and version management after the task iteration is completed.

[0176] The current branch mode means that all atomic tasks are carried out within the current branch of the project where the software development task is located. It directly reuses the code content, environment configuration and dependency resources of the current branch without setting up new directories or branches. It is suitable for lightweight, urgent and isolation-free development scenarios.

[0177] As one possible implementation, in the target working mode, a TDD loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks, which may include:

[0178] If the target working mode is isolated working tree mode, check if a preset working tree directory exists; if not, create the working tree at the creation location confirmed by the user for the atomic task and switch to the first new branch; perform project dependency installation and initialization on the first new branch; run baseline tests to ensure the baseline status is normal; after the test passes, under the first new branch, use TDD loop to execute the atomic task and obtain the software code corresponding to the atomic task.

[0179] If the target working mode is the new branch mode, create and switch to the second new branch in the project directory, and perform project dependency installation and initialization on the second new branch; and, under the second new branch, use TDD loop to execute atomic tasks and obtain the software code corresponding to the atomic tasks;

[0180] If the target working mode is the current branch mode, under the current branch, use TDD loop to execute atomic tasks and obtain the software code corresponding to the atomic tasks.

[0181] For example, during the workspace preparation phase, if the target work mode is the isolated work tree mode, check if a pre-defined work tree directory exists for the development task. If the directory has not yet been created, create a new work tree in an independent path outside the project's main directory at the directory creation location confirmed by the user for the atomic task. Simultaneously, create and switch to the first new branch in this work tree to achieve physical isolation between the development environment and the project's main environment.

[0182] Furthermore, in the first new branch, the complete installation of project dependencies and the initialization of the development environment are performed to ensure that the required runtime environment and dependent components are configured correctly. Baseline test cases are then run to verify the environment status, ensuring that the baseline functionality and runtime environment of the first new branch are in a normal and usable state. Once the baseline tests pass, atomic tasks are executed using a TDD loop within the first new branch to obtain the corresponding software code.

[0183] Optionally, if the target working mode is a new branch mode, a second new branch is created in the project directory corresponding to the software development task, and the branch switch is completed to achieve logical isolation between the development task and the main branch. Project dependency installation and development environment initialization operations are performed in the second new branch to ensure that the second new branch has independent and complete development and running conditions. Under this second new branch, TDD loops are used to execute atomic tasks and obtain the software code corresponding to the atomic tasks.

[0184] If the target working mode is the current branch mode, since this mode is suitable for lightweight, urgent development scenarios that do not require environment isolation, there is no need to create an additional working tree or new branch. You can directly use the TDD loop under the current branch of the project corresponding to the software development task to execute atomic tasks and obtain the software code corresponding to the atomic tasks, so as to achieve efficient development in lightweight development scenarios.

[0185] By executing atomic tasks under different target working modes, the adaptability and rationality of environment configuration under different development scenarios can be guaranteed. At the same time, by using different development methods such as isolation or direct development, the independence of the development environment, the standardization of project management, and the efficiency of lightweight development can be balanced, reducing environmental interference and code conflicts between different development tasks.

[0186] In one possible implementation, after generating the software code for the software development task based on the confirmation result, the process may further include: invoking a third-party review agent to perform quality verification on the software code for the software development task according to the task type. The quality verification includes integrity verification, code review, and document synchronization check. Integrity verification is used to verify whether the software development task has been fully completed. Code review is used to review the changed software code. Document synchronization check is used to verify the synchronization between software code changes and design document changes based on the relationship between the software code and the design document. If the quality verification passes, the software development task is declared complete.

[0187] Because existing technologies lack mandatory verification mechanisms when AI declares task completion—that is, they lack quality assurance mechanisms—there is a possibility of claims of completion that are not actually completed. To address these limitations, the following solution is proposed:

[0188] After the software code for the software development task is generated, during the quality verification phase, a third-party review agent is invoked to review the overall implementation of the software development task based on the task type. This involves quality verification of the software code, including integrity verification, code review, and document synchronization checks.

[0189] Integrity verification is used to verify whether software development tasks have been fully completed according to target requirements and design documents. Specifically, a third-party review agent is invoked to determine standardized verification commands that can prove task completion based on the task type, such as commands to select test functions or build components. The complete verification commands are executed, and the verification output is read, with a focus on checking whether the command exit codes and actual verification results meet the task completion standards. Integrity verification passes only when both the exit codes and actual verification results meet the task completion standards and it is clearly confirmed that all functionalities of the task have been implemented—that is, when the task is confirmed to be complete. The exit code is an integer value returned after program execution; 0 indicates task success, and a non-zero value indicates task failure. The actual verification results are used to determine whether the test / build was successful or failed, such as a 100% test pass rate or a successful build generating a package file.

[0190] Code review is used to examine modified software code. Specifically, it involves obtaining the version identifier corresponding to the code change, such as a Git commit hash. This version identifier is unique and can accurately pinpoint the changed code content, location, and committer. After obtaining the version identifier, a third-party review agent is invoked to review the code changes according to established specifications. Issues identified during the review are categorized by severity: critical issues are fixed immediately, important issues are prioritized for later processing, and minor issues are recorded and awaiting further action. This ensures that the modified code meets project standards in terms of specification compliance, coding quality, and logical rationality.

[0191] Because existing technologies lack a document synchronization check mechanism when AI performs development tasks, AI often ignores the synchronized updates of related design documents after modifying code. This leads to subsequent development by developers or AI based on outdated design documents, resulting in a disconnect between code and documentation, and a document synchronization problem. To address this issue, a document synchronization check is proposed.

[0192] Document synchronization checks are used to verify the consistency between software code changes and design document changes based on the relationship between software code and design documents. Specifically, it involves listing all changed documents since the project's last stable point, such as the last launch, last delivery, or last review approval, including both code and documentation files.

[0193] Furthermore, each changed document is precisely categorized, distinguishing between synchronization scenarios such as no synchronization required, code to document, document to code, and two-way changes. Specifically, no synchronization required means internal changes do not affect the document; code to document means code changes affect the document description, requiring synchronized updates to the document description; document to code means document specification changes require verification of code compliance; and two-way changes mean both code and document have changed, requiring identification of an authoritative source and synchronization.

[0194] Optionally, based on the classification of each change file, only the cases requiring synchronization are synchronized, and minimal synchronization updates are performed. This involves minimizing modifications and avoiding unnecessary changes to reduce redundant modifications. Finally, the design document is re-verified to ensure it accurately and completely describes the current development status of the system, guaranteeing that the software code is synchronized with the design document without deviation and maintains consistency. For example, the interface parameters, functional logic, and calling methods of the software code are consistent with the design document.

[0195] In some embodiments, the software development task is declared complete if the quality verification passes—that is, when the integrity verification, code review, and document synchronization check all pass. In other words, when the integrity verification confirms that the software development task is fully completed, all issues in the code review have been addressed as required, and the document synchronization check achieves full synchronization between the software code and the design documents with accurate descriptions, the quality verification can be deemed successful, and the software development task can be formally declared complete.

[0196] Optionally, if any step fails verification, the specific problem and rectification requirements will be provided immediately. After targeted repair and optimization are completed, the third-party review agent will be called back to conduct quality verification until all steps pass verification.

[0197] Through multi-dimensional quality verification by a third-party review agent, the quality and standardization of software development results are guaranteed from multiple dimensions such as task implementation, code quality, and documentation consistency. This ensures that the completed software development tasks match the target requirements, design specifications, and project management standards, and form traceable, verifiable, and standardized development results.

[0198] Optionally, after declaring the completion of the software development task, the following may also be included: providing multiple closure methods, including local merge, push code, keep branch status, and discard work. Local merge is used to merge the changed software code locally into the base branch corresponding to the software development task. Push code is used to push the changed software code to the code review system. Keep branch status is used to retain the branches and software code of the software development task. Discard work is used to discard the branches and software code of the software development task. Based on the closure method selected by the user, the closure operation of the software development task is performed.

[0199] During the task closure phase, before performing any closure operations, it is necessary to verify that all test cases have passed, confirming from a functional implementation perspective that the development deliverables are free of quality defects. It is also necessary to verify that documentation and code are completed synchronously, ensuring that the documentation accurately matches the actual state of the code and maintaining consistency between the two. Furthermore, it is essential to determine the base branch of the code, i.e., the project's base branch corresponding to the software development task, defining the target branch for code merging and ensuring standardized branch management.

[0200] In some embodiments, during the task closing phase, multiple closing methods are provided to the user, and the corresponding closing operation is performed based on the closing method selected by the user.

[0201] Alternatively, cleanup methods may include local merging, pushing code, keeping the branch as it is, and discarding the work.

[0202] The local merging method merges the changed software code locally into the base branch corresponding to the software development task, achieving local integration of development results with the main branch of the project. This method is suitable for development scenarios that do not require remote review and can be implemented directly locally.

[0203] The code push method involves pushing the modified software code to a code review system, such as Gerrit, where professional reviewers conduct remote compliance and quality reviews of the modified software code. This method is suitable for development scenarios that require collaborative team review and standardized process control.

[0204] Maintaining the current branch status means preserving all branches and software code of the software development task, without merging, pushing, or deleting them for the time being. This approach is suitable for scenarios where the development results are not yet finalized and require further optimization and adjustment.

[0205] The method of discarding work content involves discarding branches and software code of software development tasks and completely restoring the project to its pre-development state. This method is suitable for scenarios where the development results do not meet expectations, do not need to be retained, and require the cleanup of development traces.

[0206] It is important to note that if you choose the local merge method or the discard method, there is no need to retain the development environment of the isolated working tree. Cleaning up the isolated working tree reduces the resource consumption of redundant directory files and their interference with subsequent project development, ensuring a clean project environment and orderly branch management.

[0207] Furthermore, users can independently select a suitable completion method based on the overall project plan, team collaboration requirements, and the need for the development deliverables. After obtaining the user's selected completion method, the corresponding software development task completion operations are automatically executed based on the operational specifications of that method.

[0208] By providing a multi-dimensional selection of closing methods to meet the needs of different development scenarios, and by performing relevant closing operations based on different closing methods, the accuracy, standardization, and completeness of closing operations can be ensured, providing a clean and standardized project environment foundation for the subsequent development of other software tasks.

[0209] In some embodiments, the AI-assisted software development method provided in this application may further include: if the software development task is a debugging task, performing a multi-stage debugging process for the software development task, wherein the multi-stage debugging process includes a root cause investigation stage, a pattern analysis stage, a hypothesis verification stage, and a fix implementation stage, wherein:

[0210] In the root cause investigation phase, error messages and stack traces are analyzed to locate the root cause of the failure. In the pattern analysis phase, the differences between the working code and the faulty code are compared. The working code is code in the codebase that has similar functionality to the code to be debugged. In the hypothesis verification phase, root cause hypotheses are formed based on the differences and the root cause of the failure, and the root cause hypotheses are verified. In the remediation implementation phase, based on the failed test cases that can reproduce the problem, remediation code for the root cause hypotheses is obtained, and the test remediation code is run to verify the effectiveness of the remediation.

[0211] Optionally, if a software development task involves vulnerability patching, test failure handling, or handling of abnormal behavior, the task is classified as a debugging task. If the task type is a debugging task, a multi-stage debugging process is executed. A debugging task is understood to be one that requires locating and fixing existing vulnerabilities, such as fixing communication timeout issues.

[0212] In existing technologies, when encountering vulnerabilities, AI often resorts to random attempts to fix them rather than systematically locating the root cause. This randomization of the debugging process can easily introduce new problems. To address these limitations, the following solution is proposed:

[0213] In a multi-stage debugging process, that is, in the system debugging process, the software development task is debugged through multiple stages, including the root cause investigation stage, pattern analysis stage, hypothesis verification stage, and repair implementation stage.

[0214] For example, in the root cause investigation phase, the error messages and stack trace logs generated by the fault are first fully read and analyzed to extract the core characteristics of the fault. Simultaneously, it is determined whether the problem can be reproduced reliably, and the reproduction steps are recorded in a standardized manner. Then, recent code change records are checked to identify modifications that may have introduced the problem. For multi-component systems, diagnostic logs are added at the boundaries of each component to locate the faulty component. For Android system issues, system logs, crash logs, and application logs are collected and analyzed. Through multi-dimensional investigation and precise analysis of fault correlation information, the root cause of the fault is initially located.

[0215] During the pattern analysis phase, using the core functionality of the code to be debugged as a benchmark, working code with similar functionality is searched in the project codebase as a reference sample. By comparing the working code with the faulty code, the differences between the two are listed. Simultaneously, the upstream and downstream dependencies of the faulty code and the pre-set assumptions during development are analyzed to provide precise comparative basis for the formation of root cause hypotheses.

[0216] During the hypothesis testing phase, based on the differences between the working code and the faulty code, and the aforementioned root causes of the fault, a single root cause hypothesis is formed and explicitly stated as "I believe X is the root cause because Y." Here, X represents the root cause, and Y is the hypothesized cause. Subsequently, a minimal verification experiment is designed to test the above root cause hypothesis, where each verification changes only one variable. If the verification fails, a new root cause hypothesis is formed and re-verified. If three consecutive hypothesis verifications fail, the problem is directly marked as an architectural-level problem, and manual intervention is automatically requested.

[0217] During the remediation implementation phase, firstly, based on the validated root cause hypothesis, write failure test cases that can reliably reproduce the problem. Then, based on these failure test cases, design and implement a single remediation plan targeting the root cause hypothesis, generating remediation code for that hypothesis. Next, run the failure test cases to verify the remediation code and confirm its effectiveness. Simultaneously, run other test cases in the project to perform compatibility checks, ensuring that the remediation operation does not disrupt other tests in the project.

[0218] Through a multi-stage debugging process, the root cause of the problem can be accurately located and fixed in a targeted manner, reducing the probability of introducing new problems due to random attempts at fixing. This improves the accuracy and reliability of debugging and ensures that the software system returns to normal operation.

[0219] Furthermore, the AI-assisted software development method provided in this application embodiment may also include: if there are multiple independent software development tasks, creating an independent execution environment for each software development task and calling an independent execution agent for each software development task to execute each software development task in parallel. The independent software development tasks mean that each software development task involves different files or subsystems, the repair of each software development task does not affect each other, and there is no shared state between each software development task.

[0220] After all software development tasks are completed, the execution results of the corresponding execution agents for each software development task are collected. Based on the execution results, it is checked whether there are any conflicts between the software development tasks. If there are no conflicts, the complete test suite of the project is retrieved, and a full test is run on the merged execution results to verify the effectiveness of the repair collaboration. If the full test passes, it is determined that multiple independent software development tasks have been successfully processed in parallel.

[0221] For example, during the task execution phase, if there are multiple software development tasks to be executed, the independence of each software development task is first determined. Specifically, if each software development task involves different files or subsystems, the repair operation of any software development task will not affect the execution results of other software development tasks, and there is no shared state between the software development tasks, then they are determined to be mutually independent software development tasks.

[0222] Optionally, if any of the above independence criteria are not met, then the software development tasks cannot be determined to be independent of each other.

[0223] In some embodiments, for multiple software tasks that are determined to be independent of each other, an isolated dedicated execution environment can be created for each software development task through an isolation work tree to reduce environmental interference and resource consumption conflicts between tasks. At the same time, an independent execution agent is invoked for each software development task, and each execution agent executes the development or debugging work of each software development task in parallel in its corresponding dedicated environment, thereby realizing the efficient parallel execution of multiple independent software development tasks and improving the overall development efficiency.

[0224] Furthermore, after each software development task has been developed or debugged by its corresponding execution agent, the execution results of each agent are collected uniformly and cross-validated. The focus is on checking for conflicts such as code conflicts, logical conflicts, and resource call conflicts between the software development tasks. If no conflicts are found, the project's pre-set complete test suite is automatically retrieved. The development results of the parallel software development tasks are merged according to the project architecture specifications, and then the full test suite is run to verify the effectiveness of the parallel task fixes or development results during collaborative runtime, ensuring functional collaboration and the absence of runtime anomalies.

[0225] Optionally, if a conflict exists, the conflict point is automatically marked and the corresponding software development task is returned. The execution agent then repairs the conflict and re-executes and verifies the task in parallel.

[0226] If the entire test suite passes 100%, it indicates that multiple independent software development tasks have been successfully processed in parallel, and the task completion phase can begin. If the test fails, the cause of the failure is located, the corresponding execution agent is returned to fix it, and then the parallel execution and verification are repeated until the entire test suite passes 100%.

[0227] The above parallel execution mechanism can improve the overall efficiency of multi-task development, enhance the reliability of multi-task parallel execution by creating independent execution environments and execution agents, reduce contradictions in the integration of multi-task results through conflict verification, and ensure the effectiveness of the merged results in collaborative operation by combining full verification of the project's complete test suite, thus achieving a dual guarantee of development efficiency and result quality.

[0228] Based on the above embodiments, the AI-assisted software development method provided in this application may further include: restating the requirements corresponding to the feedback from the review agent to the reviewer using standardized technical language, wherein the restatement process is based on technical facts, and the review agent is used to review at least one of code quality and code changes. If the reviewer indicates that the feedback is incorrect, the feedback is verified against the codebase of the current project. If the reviewer indicates that there is a better alternative to the feedback, the applicability of the alternative to the codebase is evaluated in conjunction with the actual technology of the project. If the reviewer indicates that the feedback is correct, the repair is implemented and verified according to the feedback. If the reviewer indicates that there are technical problems with the feedback, technical evidence is provided for rational rebuttal.

[0229] For example, during the quality verification phase, when feedback is received from the review agent, all feedback content should be read in its entirety without immediate reaction. That is, no immediate correction or rebuttal should be made for any single piece of feedback. However, it can be handled in the following way:

[0230] Based on the feedback from the review agency, the specific requirements corresponding to each piece of feedback are restated to the reviewer using the project's established standardized technical language, ensuring that the restatement is always based on technical facts. If, during the restatement process, issues such as vague wording or unclear definition of requirements are found, a targeted and precise clarification request is sent to the reviewer to clarify the core demands of the feedback before proceeding with subsequent steps.

[0231] If the reviewer finds errors in the feedback regarding the restated content, they will retrieve the codebase of the current project, compare the feedback with the codebase in conjunction with the actual development logic, functional implementation requirements, and project technical specifications, and conduct cross-validation to determine the correctness of the feedback.

[0232] If the reviewing party has a better alternative technical solution to the rectification requirements reflected in the restated content, then, taking into account the actual technical conditions such as the current project's technical architecture, existing development foundation, and future expansion plans, the reviewing party will evaluate whether the alternative solution is suitable for the project's codebase from the dimensions of adaptability, feasibility, and compatibility, to ensure that the evaluation results are consistent with the actual development needs of the project.

[0233] If the reviewer finds the feedback to be correct, the code will be fixed item by item according to the feedback requirements. After each fix is ​​completed, the corresponding test cases will be run to verify the effect of the fix and ensure that the fix corresponding to each piece of feedback is effective.

[0234] If the reviewer raises technical issues such as technical vulnerabilities or inconsistencies with project specifications, provide technical evidence, such as project technical documents, coding standards, and the actual operating logic of the code. Rebuttals should be made to the reviewer in a rational and objective manner, based on technical facts, without making unfounded subjective defenses, and without using performative consent language.

[0235] By using standardized technical language to relay feedback requirements to reviewers, we can ensure accurate interpretation of feedback. By implementing targeted processing procedures based on different feedback from reviewers, we can improve code quality, standardize code changes, reduce ineffective rectification, and further enhance the overall efficiency and professionalism of code review.

[0236] Optionally, the AI-assisted software development method provided in this application embodiment may further include: if the task type of the software development task is a query and retrieval task, retrieving relevant information of the software development task and feeding it back to the user, wherein the query and retrieval task includes simple query or information retrieval.

[0237] For example, during the task execution phase, if the software development task is a simple query or information retrieval, then the task type of the software development task is determined to be a query retrieval task.

[0238] If the software development task is a query / retrieval task, the system will directly respond to the user, analyze the user's query or retrieval needs for the software development task, and retrieve relevant project management information based on the user's needs. Optionally, project management information may include various related information such as task configuration information, execution progress information, code review results, test verification data, document synchronization status, and branch management records during the software development process.

[0239] Furthermore, information is screened, integrated, and verified according to standardized rules to ensure that the retrieved information is complete, accurate, and matches user needs. The organized information is then presented to users in a clear and standardized manner to meet their needs for querying and obtaining software development-related information.

[0240] Figure 2 This is a schematic diagram illustrating an application of the AI-assisted software development method provided in an embodiment of this application. For example... Figure 2 As shown, the execution flow of AI-assisted software development tasks is illustrated, including multiple stages such as task entry processing, design analysis, system debugging, workspace preparation, task execution, quality verification, and task completion.

[0241] Specifically, after a user inputs a task request, the process enters the task entry processing stage. This stage loads a standardized skills system and first categorizes the task type into two main branches: creative tasks and debugging tasks. For creative tasks, the process proceeds to the design analysis stage, sequentially completing steps such as exploring project-related aspects, clarifying requirements, proposing design solutions, confirming design solutions, writing design documents, reviewing design documents, user approval, and decomposing atomic tasks. For debugging tasks, the process directly enters the system debugging workflow, completing fault location and repair in four stages: root cause investigation, pattern analysis, hypothesis testing, and remediation implementation.

[0242] Furthermore, both branches subsequently enter the workspace preparation phase, where users choose a work mode from the isolated work tree mode, the new branch mode, and the current branch mode to set up the development environment. Following this, the task execution phase begins. Under the user-selected work mode, atomic tasks are executed based on a TDD loop, generating the corresponding software code. Simultaneously, the software code undergoes specification compliance and code quality reviews. The TDD loop includes multiple phases such as the red phase, the green phase, and the refactoring phase.

[0243] After task execution, the quality verification phase begins. This phase employs a triple-check process—pre-completion verification, code review requests, and synchronized documentation checks—to ensure the compliance and consistency of the development deliverables. Completion verification is equivalent to integrity verification, and proxy review requests are equivalent to code review. Finally, the task closure phase begins, where users choose from four closure methods: local merging, pushing to the review system, maintaining the status quo, and discarding the work. Isolation environments are cleaned up as needed. This entire process forms a closed-loop, standardized management system from task initiation to deliverable implementation.

[0244] In summary, the AI-assisted software development method provided in this application has at least the following advantages:

[0245] First, by parsing the task request, the task type of the software development task corresponding to the task requirements is obtained. If the task type is a creative task, the user's confirmed target requirements for the software development task are obtained based on the task requirements, ensuring that the development starting point matches the user's actual needs. Based on the target requirements, a design scheme for the software development task is generated, and according to the progressive implementation logic of software development, the design scheme is divided into multiple design stages, and the design content of each stage is displayed sequentially to obtain the user's confirmation results. This phased verification effectively mitigates the deviation between the design stage and the user's actual needs, reduces subsequent rework waste caused by overall design deviations, and ensures that code development further meets the user's actual needs in the design stage. Then, based on the confirmation results, the software code for the software development task is generated. From requirements analysis and design generation to code development, the entire process realizes the confirmation and implementation of the user's actual needs, ensuring that the software development process matches actual needs and reducing rework waste.

[0246] Second, the design-first mandatory constraint mechanism sets up a skill judgment stage at the task entry stage to identify creative tasks and force them to enter the design analysis stage. This ensures that AI does not write implementation code before obtaining clear design approval, but only starts coding after fully understanding the requirements and obtaining design approval. This alleviates the deviation from requirements caused by coding before designing and the rework waste caused by misunderstanding from the source, thereby improving the accuracy of requirement implementation.

[0247] Third, during the task execution phase, the TDD (Test-Driven Development) cycle forces the AI ​​to write failure test cases before writing implementation code and verify that the tests actually fail. This ensures that the code has test coverage and that the test cases are effective. This improves code testability and maintainability while reducing the vulnerability rate, thereby improving code quality and achieving closed-loop test-driven execution. In the system debugging process, the sequential execution of the four stages—root cause investigation, pattern analysis, hypothesis testing, and remediation implementation—forces the AI ​​to refrain from proposing remediation solutions before identifying the root cause when fixing vulnerabilities. That is, the root cause must be identified before remediation is implemented. This allows for rapid identification of the root cause and targeted remediation, reducing time wasted on random attempts and the introduction of secondary vulnerabilities, thus improving debugging efficiency.

[0248] Fourth, during the quality verification phase, by enforcing verification commands and providing verification evidence before the completion declaration, we ensure that the task is truly completed, mitigating the problem of claiming completion but not actually completing it, and ensuring the accuracy of the task status. Through an evidence-first verification mechanism, we guarantee that the task completion status is supported by objective evidence, improving the credibility of task completion and thus enhancing the reliability of task delivery. By automatically checking the consistency between documentation and code before code submission and categorizing and handling synchronization requirements, we mitigate the problem of documentation not being updated after code modifications, ensuring that related documentation is updated promptly after code changes, alleviating the problem of developing based on outdated documentation, and thus maintaining consistency between documentation and code.

[0249] Fifth, during the task execution phase, two independent review stages—specification compliance review and code quality review—are implemented. Specification and quality issues are handled in a tiered manner, making the review more targeted and ensuring that the implementation meets both design specifications and code quality standards, thereby improving code review efficiency. Furthermore, by requiring AI to technically verify review feedback rather than blindly implementing it, the rationality of the fixes is ensured, reducing the risk of problems introduced by review feedback and making code changes more reliable. If multiple independent software development tasks exist, an isolated working tree and parallel proxy mechanism are used to create independent execution environments for each task, allowing multiple tasks to execute in parallel, reducing mutual interference during multi-task execution, and thus improving overall development efficiency.

[0250] In summary, the AI-assisted software development method provided in this application embodiment can ensure that the software development process matches actual needs and reduce rework waste.

[0251] Figure 3 This is a schematic diagram of the structure of an AI-assisted software development apparatus provided in an embodiment of this application. Figure 3 As shown, the AI-assisted software development apparatus 30 provided in this application embodiment includes:

[0252] The task entry processing module 301 is used to parse the task request and obtain the task type of the software development task corresponding to the task request.

[0253] The design analysis module 302 is used to generate a design scheme for the software development task based on the target requirements, and divide the design scheme into design content of multiple design stages according to the progressive implementation logic of software development. Each design stage corresponds to a different technical function module in the software development task. The module also displays the design content of multiple design stages in sequence to obtain the user's confirmation of the design content.

[0254] The code generation module 303 is used to generate software code for software development tasks based on the confirmation results.

[0255] In one possible implementation, the design analysis module 302 is specifically used to: obtain project-related information related to the software development task; and, based on the task request and project-related information, determine the target requirements confirmed by the user for the software development task through questioning.

[0256] In one possible implementation, based on the task request and project-related information, the target requirements confirmed by the user for the software development task are determined by asking questions. This includes clarifying the development requirements by asking the user questions one by one based on the task request and project-related information, until the task objectives, constraints and success criteria of the software development task are clearly defined, thus obtaining the target requirements.

[0257] In one possible implementation, the design analysis module 302 is further used to: recommend multiple implementation schemes corresponding to the software development task based on the target requirements and the reasons for recommending the implementation schemes; and obtain the scheme selected by the user from the multiple implementation schemes as the design scheme for the software development task.

[0258] In one possible implementation, the code generation module 303 is specifically used to: generate a design document for the software development task based on the confirmation result; parse the content structure of the design document and decompose it into multiple executable atomic tasks according to the smallest executable granularity; execute the atomic tasks using a test-driven development loop to obtain the software code corresponding to the atomic tasks; and obtain the software code for the software development task based on the software code corresponding to the atomic tasks after all the atomic tasks have been completed.

[0259] In one possible implementation, the TDD cycle includes the following phases: Red phase: Write failure test cases for the target function corresponding to the atomic task; First verification phase: Run the failure test cases to confirm that the test failed due to the missing function; Green phase: Write the minimal implementation code that makes the test pass; Second verification phase: Run the test implementation code to confirm that the test passes and other tests are not broken, thus obtaining the software code corresponding to the atomic task.

[0260] In one possible implementation, the TDD cycle also includes the following phase: Refactoring phase: Optimize the code structure of the implementation code, provided that the tests pass.

[0261] In one possible implementation, before breaking down the design document into multiple executable atomic tasks, the process includes: invoking a first review agent to perform a normative review of the design document; if problems are found during the review, they are fixed and then reviewed again until the review is passed.

[0262] In one possible implementation, after obtaining the software code corresponding to the atomic task, the process further includes: submitting the software code and test code corresponding to the atomic task to a version control system to obtain code review results. The version control system is used to call a second review agent to review the submitted code. The code review results include specification compliance review results and code quality review results. The specification compliance review results indicate whether the submitted code conforms to the design specifications in the design document, and the code quality review results indicate whether the style of the submitted code conforms to the preset coding standards, whether there are potential problems, and the test coverage. If the code review results indicate that the review has passed, the corresponding atomic task is marked as completed.

[0263] In one possible implementation, the code generation module 303 is also used to: detect whether there is a blockage during the execution of the atomic task; if a blockage is detected, take corresponding handling measures according to the type of blockage: if the blockage type is missing information, supplement the relevant information and re-execute; if the blockage type is that the task complexity is greater than the complexity threshold, split the atomic task into atomic subtasks and execute them; if the blockage type is that there is a problem with the design scheme, notify manual handling.

[0264] In one possible implementation, before executing the atomic task, the method further includes: providing multiple working modes to constrain the development environment; obtaining the target working mode selected by the user from the multiple working modes; and executing the atomic task using a TDD loop to obtain the software code corresponding to the atomic task, including: executing the atomic task using a TDD loop under the target working mode to obtain the software code corresponding to the atomic task.

[0265] In one possible implementation, multiple working modes include isolated working tree mode, new branch mode, and current branch mode. Isolated working tree mode means creating a new working tree in an independent directory outside the project directory corresponding to the software development task. New branch mode means creating a new branch in the project directory corresponding to the software development task. Current branch mode means working on the current branch corresponding to the software development task.

[0266] In one possible implementation, under the target working mode, a TDD loop is used to execute atomic tasks and obtain the software code corresponding to the atomic tasks. This includes: if the target working mode is an isolated working tree mode, checking if a preset working tree directory exists; if not, creating a working tree at the creation location confirmed by the user for the atomic task and switching to the first new branch; performing project dependency installation and initialization on the first new branch; running baseline tests to ensure the baseline state is normal; after the tests pass, under the first new branch, using a TDD loop to execute atomic tasks and obtain the software code corresponding to the atomic tasks; if the target working mode is a new branch mode, creating and switching to a second new branch in the project directory, performing project dependency installation and initialization on the second new branch; and under the second new branch, using a TDD loop to execute atomic tasks and obtain the software code corresponding to the atomic tasks; if the target working mode is the current branch mode, under the current branch, using a TDD loop to execute atomic tasks and obtain the software code corresponding to the atomic tasks.

[0267] In one possible implementation, the code generation module 303 is further configured to: invoke a third review agent to perform quality verification on the software code of the software development task according to the task type. The quality verification includes integrity verification, code review, and document synchronization check. Integrity verification is used to verify whether the software development task has been fully completed. Code review is used to review the software code that has been changed. Document synchronization check is used to verify the synchronization between software code changes and design document changes based on the relationship between the software code and the design document. If the quality verification passes, the software development task is declared complete.

[0268] In one possible implementation, the code generation module 303 is further configured to: provide multiple cleanup methods, including local merging, code push, maintaining branch status, and discarding work; local merging is used to merge the changed software code locally into the base branch corresponding to the software development task; code push is used to push the changed software code to the code review system; maintaining branch status is used to retain the branches and software code of the software development task; and discarding work is used to discard the branches and software code of the software development task; and execute the cleanup operation of the software development task based on the cleanup method selected by the user.

[0269] In one possible implementation, the code generation module 303 is further configured to: if the software development task is a debugging task, execute a multi-stage debugging process for the software development task. The multi-stage debugging process includes a root cause investigation stage, a pattern analysis stage, a hypothesis testing stage, and a repair implementation stage, wherein: in the root cause investigation stage, error information and stack traces are analyzed to locate the root cause of the failure; in the pattern analysis stage, the differences between the working code and the faulty code are compared, where the working code is code in the code library that has a similar function to the code to be debugged; in the hypothesis testing stage, root cause hypotheses are formed based on the differences and the root cause of the failure, and the root cause hypotheses are verified; in the repair implementation stage, based on the failed test cases that can reproduce the problem, repair code for the root cause hypotheses is obtained, and the test repair code is run to verify the effectiveness of the repair.

[0270] In one possible implementation, the code generation module 303 is further configured to: if there are multiple independent software development tasks, create an independent execution environment for each software development task and call an independent execution agent for each software development task to execute the software development tasks in parallel. The independent software development tasks mean that each software development task involves different files or subsystems, the repair of each software development task does not affect each other, and there is no shared state between the software development tasks; after each software development task is completed, collect the execution results of the corresponding execution agents of each software development task, and check whether there are any conflicts between the software development tasks based on the execution results; if there are no conflicts, retrieve the complete test suite of the project and run a full test on the merged execution results to verify the effectiveness of the repair collaboration; if the full test passes, it is determined that the multiple independent software development tasks are successfully processed in parallel.

[0271] In one possible implementation, the code generation module 303 is further configured to: restate the requirements corresponding to the feedback from the review agent to the reviewer using standardized technical language, the restatement process being based on technical facts, and the review agent being used to review at least one of code quality and code changes; if the reviewer indicates that the feedback is incorrect, then verify the correctness of the feedback by comparing it with the current project's codebase; if the reviewer indicates that there is a better alternative to the feedback, then evaluate whether the alternative is applicable to the codebase, taking into account the actual technology of the project; if the reviewer indicates that the feedback is correct, then implement the fix according to the feedback and verify it; if the reviewer indicates that there are technical problems with the feedback, then provide technical evidence for a rational rebuttal.

[0272] In one possible implementation, the code generation module 303 is further configured to: if the task type of the software development task is a query and retrieval task, retrieve relevant information about the software development task and provide it back to the user; the query and retrieval task includes simple query or information retrieval.

[0273] The AI-assisted software development apparatus provided in this application embodiment can execute the methods provided in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0274] Figure 4 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Figure 4 As shown, the computing device 40 provided in this embodiment includes at least one processor 401 and a memory 402. Optionally, the computing device 40 further includes a communication component 403. The processor 401, memory 402, and communication component 403 are connected via a bus.

[0275] In a specific implementation, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to perform the above-described method.

[0276] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0277] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0278] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0279] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0280] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0281] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0282] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0283] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0284] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0285] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0286] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0287] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0288] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0289] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for developing AI-assisted software, characterized in that, include: Parse the task request to obtain the task type of the software development task corresponding to the task request; If the task type of the software development task is a creative task, obtain the target requirements confirmed by the user for the software development task based on the task request. Based on the target requirements, a design scheme for the software development task is generated, and according to the progressive implementation logic of software development, the design scheme is divided into design content of multiple design stages, each of which corresponds to a different technical functional module in the software development task. The design content of the multiple design stages is displayed sequentially to obtain user confirmation of the design content; Based on the confirmation result, the software code for the software development task is generated.

2. The AI-assisted software development method according to claim 1, characterized in that, The process of obtaining the user's confirmed target requirements for the software development task includes: Obtain project-related information related to the software development task; Based on the task request and the project-related information, the user's target requirements for the software development task are determined through questioning.

3. The AI-assisted software development method according to claim 2, characterized in that, The process of determining the user's target requirements for the software development task based on the task request and project-related information, through questioning, includes: Based on the task request and the project-related information, the development requirements are clarified by asking the user questions one by one until the task objectives, constraints and success criteria of the software development task are clearly defined, thus obtaining the target requirements.

4. The AI-assisted software development method according to any one of claims 1 to 3, characterized in that, The step of generating a design scheme for the software development task based on the target requirements includes: Based on the aforementioned target requirements, we recommend several implementation schemes for the software development task and the reasons for recommending each scheme. The solution selected by the user from the multiple implementation options is used as the design scheme for the software development task.

5. The AI-assisted software development method according to any one of claims 1 to 3, characterized in that, The step of generating the software code for the software development task based on the confirmation result includes: Based on the confirmation results, a design document for the software development task is generated; The content structure of the design document is analyzed, and the design document is decomposed into multiple executable atomic tasks according to the smallest executable granularity; The test-driven development loop is used to execute the atomic tasks and obtain the software code corresponding to the atomic tasks; After all the atomic tasks are completed, the software code for the software development task is obtained based on the software code corresponding to the atomic tasks.

6. The AI-assisted software development method according to claim 5, characterized in that, The test-driven development cycle includes the following stages: Red Phase: Write failure test cases for the target functions corresponding to the atomic tasks; First verification phase: Run the failed test cases to confirm that the test failed due to missing functionality; Green phase: Write the minimum implementation code that will make the tests pass; The second verification phase involves running the implementation code to test whether the test is passed and whether other tests are broken, thereby obtaining the software code corresponding to the atomic task.

7. The AI-assisted software development method according to claim 6, characterized in that, The test-driven development cycle also Includes the following stages: Refactoring phase: Optimize the code structure of the implementation code, provided that the tests pass.

8. The AI-assisted software development method according to claim 5, characterized in that, Before breaking down the design document into multiple executable atomic tasks, the method further includes: Invoke the first review agent to conduct a standardization review of the design document; If problems are found during the review, they will be fixed and reviewed again until the review is passed.

9. The AI-assisted software development method according to claim 5, characterized in that, After obtaining the software code corresponding to the atomic task, the process also includes: Submit the software code and test code corresponding to the atomic task to the version control system to obtain code review results. The version control system is used to call the second review agent to review the submitted code. The code review results include specification compliance review results and code quality review results. The specification compliance review results indicate whether the submitted code conforms to the design specifications in the design document. The code quality review results indicate whether the style of the submitted code conforms to the preset coding specifications, whether there are potential problems, and the test coverage. If the code review result indicates that the review has passed, then the corresponding atomic task is marked as complete.

10. The AI-assisted software development method according to claim 5, characterized in that, Also includes: During the execution of the atomic task, detect whether there is any blockage; If a blockage is detected, the corresponding handling measures shall be taken according to the type of blockage: If the blocking type is missing information, re-execute after supplementing the relevant information; If the blocking type is that the task complexity is greater than the complexity threshold, the atomic task is split into atomic subtasks and executed. If the blocking type indicates a problem with the design, notify manual intervention.

11. The AI-assisted software development method according to claim 5, characterized in that, Prior to performing the atomic task, the following is also included: Multiple working modes are provided, which are used to constrain the development environment; Obtain the target working mode selected by the user from the multiple working modes; The step of using a test-driven development loop to execute the atomic task and obtain the software code corresponding to the atomic task includes: in the target working mode, using a test-driven development loop to execute the atomic task and obtain the software code corresponding to the atomic task.

12. The AI-assisted software development method according to claim 11, characterized in that, The various working modes include isolated working tree mode, new branch mode, and current branch mode. The isolated working tree mode means creating a new working tree in an independent directory outside the project directory corresponding to the software development task. The new branch mode means creating a new branch in the project directory corresponding to the software development task. The current branch mode means working on the current branch corresponding to the software development task.

13. The AI-assisted software development method according to claim 11, characterized in that, In the target working mode, a test-driven development loop is used to execute the atomic tasks and obtain the software code corresponding to the atomic tasks, including: If the target working mode is the isolated working tree mode, check if a preset working tree directory exists; if not, create a working tree at the creation location confirmed by the user for the atomic task and switch to the first new branch; perform project dependency installation and initialization in the first new branch; run baseline tests to ensure the baseline status is normal; after the test passes, under the first new branch, use a test-driven development loop to execute the atomic task and obtain the software code corresponding to the atomic task; If the target working mode is a new branch mode, create and switch to a second new branch in the project directory, and perform project dependency installation and initialization in the second new branch; and, in the second new branch, use a test-driven development loop to execute the atomic task and obtain the software code corresponding to the atomic task; If the target working mode is the current branch mode, under the current branch, the test-driven development loop is used to execute the atomic task and obtain the software code corresponding to the atomic task.

14. The AI-assisted software development method according to any one of claims 1 to 3, characterized in that, After generating the software code for the software development task based on the confirmation result, the process further includes: A third review agent is invoked to perform quality verification on the software code of the software development task according to the task type. The quality verification includes integrity verification, code review, and document synchronization check. The integrity verification is used to verify whether the software development task has been fully completed. The code review is used to review the software code that has been changed. The document synchronization check is used to verify the synchronization between the changes in the software code and the changes in the design document based on the relationship between the software code and the design document. If the quality verification passes, the software development task is declared complete.

15. The AI-assisted software development method according to claim 14, characterized in that, After declaring the completion of the software development task, the following is also included: Multiple cleanup methods are provided, including local merging, code push, maintaining branch status, and discarding work. Local merging is used to merge the changed software code locally into the base branch corresponding to the software development task. Code push is used to push the changed software code to the code review system. Maintaining branch status is used to retain all branches and software code of the software development task. Discarding work is used to discard the branches and software code of the software development task. Based on the closing method selected by the user, the closing operation of the software development task is performed.

16. The AI-assisted software development method according to any one of claims 1 to 3, characterized in that, Also includes: If the software development task is a debugging task, a multi-stage debugging process is executed for the software development task. The multi-stage debugging process includes a root cause investigation stage, a pattern analysis stage, a hypothesis testing stage, and a fix implementation stage, wherein: During the root cause investigation phase, error messages and stack traces are analyzed to pinpoint the root cause of the failure. During the pattern analysis phase, the differences between working code and fault code are compared. The working code is code in the code library that has a similar function to the code to be debugged. In the hypothesis verification phase, a root cause hypothesis is formed based on the differences and the root causes of the failure, and the root cause hypothesis is verified. During the remediation implementation phase, based on the failed test cases that can reproduce the problem, remediation code is obtained for the root cause hypothesis, and the remediation code is run to verify the effectiveness of the remediation.

17. The AI-assisted software development method according to any one of claims 1 to 3, characterized in that, Also includes: If there are multiple independent software development tasks, create an independent execution environment for each software development task and call an independent execution agent for each software development task to execute each software development task in parallel. The independent software development tasks mean that each software development task involves different files or subsystems, the repair of each software development task does not affect each other, and there is no shared state between each software development task. After all software development tasks are completed, the execution results of the corresponding execution agents for each software development task are collected, and the conflict between the software development tasks is checked based on the execution results. If there are no conflicts, retrieve the project's complete test suite and run full tests on the merged execution results to verify the effectiveness of the fix collaboration; If the full test passes, it confirms that the multiple independent software development tasks were successfully processed in parallel.

18. The AI-assisted software development method according to any one of claims 1 to 3, characterized in that, Also includes: Based on the feedback from the review agent, the requirements corresponding to the feedback are restated to the reviewer using standardized technical language. The restatement process is based on technical facts. The review agent is used to review at least one of code quality and code changes. If the reviewer finds the feedback incorrect, then the feedback should be verified against the codebase of the current project to determine if it is correct. If the reviewer indicates that there is a better alternative to the feedback, then, in conjunction with the actual technology of the project, the applicability of the alternative to the codebase will be evaluated. If the reviewing party confirms that the feedback is correct, then the repair is implemented and verified based on the feedback; If the reviewing party indicates that the feedback has technical issues, then provide technical evidence to rationally refute it.

19. The AI-assisted software development method according to any one of claims 1 to 3, characterized in that, Also includes: If the task type of the software development task is a query and retrieval task, the relevant information of the software development task is retrieved and fed back to the user. The query and retrieval task includes simple query or information retrieval.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed, are used to implement the method as described in any one of claims 1 to 19.