Requirements identification methods and systems for coded intelligent agents
By acquiring multi-source data, transforming and clustering it, scoring key requirements, generating implicit requirements and verifying artifacts, the problem of coding agents being unable to accurately locate key requirements is solved, ensuring that the generated code is consistent with user needs.
Patent Information
- Application Number
- CN202611216349.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-11-10
AI Technical Summary
When faced with long documents, coding agents tend to overlook the key requirements that truly impact the implementation path and fail to accurately understand the user's vague expressions, resulting in generated code that does not match the user's needs.
By acquiring multi-source data, including user dialogues, requirement documents, code structure, and organizational strategies, the data is transformed and clustered to generate requirement clusters. Candidate requirements are scored, focus requirements are marked, implicit requirements and validation artifacts are generated, requirement clusters are updated based on user responses, and finally, a requirement baseline is generated.
It enables the coding agent to accurately locate the focus of user needs and generate code that meets those needs, thus avoiding iterative code modifications and omissions of key logic.
Smart Images

Figure CN123068546A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and system for requirements identification of coded intelligent agents. Background Technology
[0002] In existing AI Coding scenarios (development methods that utilize large language models or intelligent agents to assist in understanding software requirements, generating code, debugging, testing, and delivery), users can directly upload requirement documents to provide their needs, requesting the Coding Agent to generate corresponding code. However, when faced with long documents, the Coding Agent tends to focus on local text and overlook the key requirements that truly impact the implementation path; when faced with vague expressions from users, it fails to accurately understand the user's key requirements, resulting in generated code that does not match the user's needs (potentially implementing superficial functionality while omitting critical requirements such as permissions, security, exception handling, data consistency, compatibility, and log auditing).
[0003] There is currently no effective solution to the problem that the coded intelligent agent cannot accurately locate the key requirements in related technologies, resulting in the generated code not matching the user's needs. Summary of the Invention
[0004] This embodiment provides a method and system for confirming requirements for coded intelligent agents, in order to solve the problem in related technologies where coded intelligent agents cannot accurately locate the key requirements, resulting in generated code that does not match the user's requirements.
[0005] Firstly, this embodiment provides a requirement confirmation method for coded intelligent agents, including:
[0006] Acquire multi-source data related to users' AI Coding requests; and transform and cluster the multi-source data to obtain demand clusters;
[0007] Each candidate requirement in the requirement cluster is scored, and the corresponding candidate requirement is marked based on the scoring results to obtain the focus requirement;
[0008] Based on the preset template and the multi-source data, implicit requirements are generated; and based on the focus requirements and the implicit requirements, verification workpieces are generated.
[0009] Generate clarification questions, and update the requirement cluster based on the user's response to the clarification questions;
[0010] A requirement baseline is generated based on the updated requirement cluster, the implicit requirements, and the verification artifact.
[0011] In some embodiments, multi-source data related to a user's AI Coding request is acquired, including:
[0012] Obtain the AI Coding request submitted by the user;
[0013] Based on the AI Coding request, relevant multi-source data is collected; the multi-source data includes user dialogues, requirement documents, code structure, organizational strategies, and historical projects.
[0014] In some embodiments, the multi-source data is transformed and clustered to obtain demand clusters, including:
[0015] The multi-source data is converted into demand candidate units with source evidence;
[0016] Based on preset clustering requirements, the candidate demand units are clustered to obtain demand clusters belonging to the corresponding levels; the clustering requirements are at least one or more of semantic similarity, structural similarity, or dependency relationship; the levels include target layer, functional layer, quality layer, and constraint layer.
[0017] In some embodiments, the candidate demand units are clustered based on preset clustering requirements to obtain demand clusters belonging to the corresponding levels, including:
[0018] When the clustering requirement is the semantic similarity, the candidate demand units are converted into text structures; the semantic similarity of the converted candidate demand units is calculated using a preset cosine similarity formula to obtain the semantic similarity result;
[0019] When the clustering requirement is the structural similarity, the candidate demand units are converted into a tree structure, and the structural similarity of the converted candidate demand units is calculated using a preset structural similarity formula to obtain the structural similarity result.
[0020] When the clustering requirement is the dependency relationship, the dependency relationship of the candidate demand unit is calculated using a preset dependency relationship formula to obtain the dependency relationship result;
[0021] By combining the semantic similarity results, the structural similarity results, and the relevance in the dependency relationship results, the candidate demand units are clustered to obtain demand clusters belonging to the corresponding levels.
[0022] In some embodiments, each candidate requirement in the requirement cluster is scored, including:
[0023] Based on the implementation path that affects the coded agent, a focus scoring formula is constructed;
[0024] Based on the aforementioned focus scoring formula, each candidate requirement in the requirement cluster is scored.
[0025] In some embodiments, the method further includes:
[0026] Based on a preset confidence formula, the confidence level of each demand cluster is calculated;
[0027] The corresponding demand clusters are labeled based on the confidence level.
[0028] In some embodiments, implicit requirements are generated based on a preset template and the multi-source data, including:
[0029] Determine the template that matches the multi-source data, and call the matching template to output the corresponding implicit requirement;
[0030] Forced constraints are injected based on the organization strategy in the multi-source data to generate corresponding implicit requirements;
[0031] Based on the similar requirements of historical projects in the multi-source data, the team's quality requirements are extracted to generate corresponding implicit requirements;
[0032] Existing constraints are inferred from the code structure in the multi-source data to generate corresponding implicit requirements.
[0033] In some of these embodiments, generating clarification questions includes:
[0034] Based on a pre-defined problem value formula, the problem value of each candidate clarification problem is calculated.
[0035] Clarification questions are selected from the candidate clarification questions based on the value of the question.
[0036] In some embodiments, a requirement baseline is generated based on the updated requirement cluster, the implicit requirements, and the verification artifact, including:
[0037] Under a preset priority, a structured requirement baseline is generated based on the updated requirement cluster, the implicit requirements, and the verification artifact;
[0038] The priority is as follows: the core focus requirement among the focus requirements has a higher priority than the general focus requirement among the focus requirements; the necessary implicit requirement among the implicit requirements has a higher priority than the general implicit requirement among the implicit requirements.
[0039] The demand baseline includes at least confirmed demands, open hypotheses, rejected or delayed demands, validation artifacts, and agent execution constraints.
[0040] Secondly, this embodiment provides a requirement confirmation system for coded intelligent agents, characterized in that it includes: a user input layer, a requirement confirmation layer, and a coding execution layer; wherein the user input layer is connected to the coding execution layer through the requirement confirmation layer;
[0041] The user input layer is used to input the user's AI Coding request;
[0042] The requirement confirmation layer is used to perform the steps of the requirement confirmation method for coded intelligent agents described in the first aspect above.
[0043] The encoding execution layer is used to generate target code based on the requirement baseline.
[0044] Compared with related technologies, the requirement confirmation method and system for coding agents provided in this embodiment obtains multi-source data related to the user's AI Coding request; transforms and clusters the multi-source data to obtain requirement clusters; scores each candidate requirement in the requirement cluster and marks the corresponding candidate requirements based on the scoring results to obtain the focus requirement; generates implicit requirements based on a preset template and multi-source data; generates verification artifacts based on the focus requirement and implicit requirements; generates clarification questions and updates the requirement clusters based on the user's responses to the clarification questions; and generates a requirement baseline based on the updated requirement clusters, implicit requirements, and verification artifacts. This solves the problem in the technology where the coding agent cannot accurately locate the focus requirement, resulting in the generated code not matching the user's requirements. By scoring each candidate requirement in the requirement cluster to anchor the focus requirement, and combining implicit requirements and clarification questions, a requirement baseline that closely matches the user's actual needs is output, thereby enabling the coding agent to generate code that meets the user's needs based on the requirement baseline.
[0045] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0046] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0047] Figure 1 This is a hardware structure block diagram of a terminal device for a requirement confirmation method for coded intelligent agents provided in an embodiment of this application;
[0048] Figure 2 This is a flowchart of a requirement verification method for coded intelligent agents provided in an embodiment of this application;
[0049] Figure 3 This is a flowchart of step S310;
[0050] Figure 4 This is a flowchart illustrating the process of obtaining a demand cluster through clustering, as provided in one embodiment of this application.
[0051] Figure 5 This is a flowchart of scoring each candidate requirement in a requirement cluster provided in one embodiment of this application;
[0052] Figure 6 This is a flowchart of generating implicit requirements provided in one embodiment of this application;
[0053] Figure 7 This is a flowchart of generating clarification questions provided in one embodiment of this application;
[0054] Figure 8 This is a structural block diagram of a requirement verification system for coded intelligent agents provided in an embodiment of this application.
[0055] In the diagram: 102, Processor; 104, Memory; 106, Transmission Device; 108, Input / Output Device; 810, User Input Layer; 820, Requirement Confirmation Layer; 830, Encoding Execution Layer. Detailed Implementation
[0056] To better understand the purpose, technical solution, and advantages of this application, the application is described and explained below in conjunction with the accompanying drawings and embodiments.
[0057] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.
[0058] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal for the requirement confirmation method for coded intelligent agents in this embodiment. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0059] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the requirement confirmation method for coded intelligent agents in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0060] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0061] This embodiment provides a method for requirement confirmation for coded intelligent agents. Figure 2 This is a flowchart of the requirement confirmation method for coded intelligent agents in this embodiment, such as... Figure 2 As shown, the process includes the following steps:
[0062] Step S210: Obtain multi-source data related to the user's AI Coding request; and transform and cluster the multi-source data to obtain demand clusters;
[0063] Step S220: Score each candidate requirement in the requirement cluster and mark the corresponding candidate requirements based on the scoring results to obtain the focus requirement;
[0064] Step S230: Generate implicit requirements based on preset templates and multi-source data; and generate verification workpieces based on focus requirements and implicit requirements.
[0065] Step S240: Generate clarification questions and update the requirement cluster based on user responses to the clarification questions;
[0066] Step S250: Generate a requirement baseline based on the updated requirement cluster, implicit requirements, and verification artifacts.
[0067] Specifically, a user's AI Coding request refers to an interactive request initiated by the user to the coding agent in an AI Coding scenario, containing code-related requirement instructions, through dialogue, mixed text with attached code snippets, documents, etc. Because the requirements given in dialogue are often incomplete, imprecise, or even contain implicit premises, vague expressions, or conflicting descriptions, the coding agent cannot accurately understand the user's focus. On the other hand, documents provide a lot of information, causing the coding agent to easily focus on local text and ignore the key requirements that truly affect the implementation path. These situations can all lead to generated code that does not match the user's requirements. In this embodiment, based on the AI Coding request, multi-source data related to the AI Coding request is acquired. This multi-source data includes, but is not limited to, user dialogue, requirement documents, code structure, organizational strategies, and historical projects, thereby comprehensively reconstructing the entire development requirement and compensating for the lack of single information dimensions. The multi-source data is then transformed and clustered to obtain requirement clusters, thereby unifying heterogeneous data structures, eliminating data format differences, aggregating similar requirements, and improving the overall efficiency of requirement processing.
[0068] Since key requirements can alter the overall code structure—for example, changing module boundaries, interface design, permission rules, acceptance criteria, or testing strategies—it is essential that the coding agent accurately identifies the user's key requirements. In this embodiment, each candidate requirement within a requirement cluster is scored, and corresponding candidate requirements are labeled based on the scoring results. Candidate requirements with scores greater than a preset scoring threshold are selected as key requirements; candidate requirements with scores equal to or less than the preset scoring threshold are designated as auxiliary requirements, used for background or supplementary processing.
[0069] In Coding Agent scenarios, users often only express surface-level functionality, but the actual implementation also requires implicit requirements such as security and permissions. Therefore, generating implicit requirements based on preset templates and multi-source data can fully capture the underlying constraints not explicitly stated by users, avoiding omissions in control logic during development and reducing code iteration modifications. Then, based on the focus requirements and implicit requirements, verification artifacts are generated to prove that the requirements are feasible and acceptable, giving the Coding Agent acceptance criteria before coding. Clarification questions address uncertainties in candidate requirements. After the user responds to the clarification questions, the requirement family is updated based on the user's response; thus, the clarification results are solidified, preventing potential forgetting or misuse in subsequent calls.
[0070] After obtaining the updated requirement set, implicit requirements, and verification artifacts, a structured, scoreable, traceable, and verifiable requirement baseline can be generated based on the updated requirement set, implicit requirements, and verification artifacts. This transforms the user's limited and incomplete input into a structured, scoreable, traceable, verifiable, and user-confirmable requirement baseline, enabling the Coding Agent to carry out subsequent implementation based on clear focus requirements and acceptance criteria.
[0071] Through the above steps, multi-source data related to the user's AI Coding request is acquired; the multi-source data is transformed and clustered to obtain a requirement cluster; each candidate requirement in the requirement cluster is scored, and the corresponding candidate requirements are marked based on the scoring results to obtain the focus requirement; implicit requirements are generated according to a preset template and multi-source data; verification artifacts are generated based on the focus requirement and implicit requirements; clarification questions are generated, and the requirement cluster is updated based on the user's response to the clarification questions; a requirement baseline is generated based on the updated requirement cluster, implicit requirements, and verification artifacts. This solves the problem in the technology where the coding agent cannot accurately locate the focus requirement, resulting in code that does not match the user's needs. By scoring each candidate requirement in the requirement cluster to anchor the focus requirement, and combining implicit requirements and clarification questions, a requirement baseline that closely matches the user's actual needs is output, thereby enabling the coding agent to generate code that meets the user's needs based on the requirement baseline.
[0072] The steps described above are explained in detail below:
[0073] In some embodiments, acquiring multi-source data related to a user's AI Coding request includes the following steps:
[0074] Obtain AI Coding requests submitted by users;
[0075] Based on AI Coding requests, relevant multi-source data is collected; the multi-source data includes user dialogues, requirement documents, code structure, organizational strategies, and historical projects.
[0076] Specifically, users can submit AI Coding requests through interactive interfaces, development tools, and other means. Under such AI Coding requests, relevant user dialogues, requirement documents, code structures, organizational strategies, and historical projects will be collected to form multi-source data. This will comprehensively restore the full picture of development requirements and make up for the lack of single information dimensions.
[0077] The user dialogues include the latest user requests, historical dialogues, user supplementary explanations, and assumptions made by the Agent; the requirements documents include PRD, Markdown, Word, PDF, interface specifications, meeting minutes, and emails; the code structure includes the directory structure, README, configuration files, interface definitions, test cases, commit history, and existing implementations; the organizational strategy includes organizational security standards, logging standards, coding style, compliance requirements, and technology stack limitations; and historical projects include similar requirements, past implementation solutions, defect records, and acceptance test cases.
[0078] Each multi-source dataset retains metadata such as source type, source location, original text, time, speaker, or file path. This allows each requirement to be traced back to the original evidence when generating a requirement baseline, avoiding the untraceability issues caused by ordinary summaries.
[0079] In some of these embodiments, such as Figure 3 As shown, the process of transforming and clustering multi-source data to obtain demand clusters includes the following steps:
[0080] Step S310: Convert multi-source data into demand candidate units with source evidence;
[0081] Step S320: Based on preset clustering requirements, cluster the candidate demand units to obtain demand clusters belonging to the corresponding levels; the clustering requirements are at least one or more of semantic similarity, structural similarity or dependency relationship; the levels include target layer, functional layer, quality layer and constraint layer.
[0082] Specifically, due to the influence of the multi-source data, it involves various data structures. To reduce the impact of data structures on subsequent processing, the multi-source data is first divided into the smallest semantic units (carrying independent and complete semantic meaning, and cannot be further subdivided into smaller linguistic units with independent expressive functions), and then converted into requirement units with source evidence. For example, the direct requirement involved in an AI Coding request is: "Help me build a website that supports QR code login." The generated requirement unit is: "The system should support users to log in to the website by scanning a QR code." Its source type is chat, the candidate type is functional, the action is to support login, the object is QR code login, and the priority signal is must.
[0083] For example: Each demand candidate unit may have the following fields (in other embodiments, demand candidate units may take different forms, which are not limited thereto):
[0084] 1. unit_id: Identifier of the demand unit.
[0085] 2. source_type: Source type, including chat, document, code, policy, or history.
[0086] 3. source_ref: Source location, such as message number, file path, chapter, code location, or policy clause.
[0087] 4. raw_span: raw fragment.
[0088] 5. normalized_text: The normalized expression of requirements.
[0089] 6. candidate_type: Candidate type, including goal, functional, non_functional, constraint, example, assumption, question, or risk.
[0090] 7. subject, action, object, condition: the subject, action, object, and triggering condition of the requirement.
[0091] 8. Metric: Quantifiable metrics, such as response time, error rate, concurrency, or coverage.
[0092] 9. priority_signal: Priority signal, such as must, should, may, or unknown.
[0093] 10. Metadata: Speaker, collection time, confidence level, and evidence citation.
[0094] Clustering requires at least one or more of semantic similarity, structural similarity, or dependency relationships. Different calculation methods can be used to cluster candidate demand units to obtain demand clusters belonging to the corresponding levels.
[0095] The hierarchy here includes the goal layer, functional layer, quality layer, and constraint layer. 1. The goal layer represents the user's true business objective. 2. The functional layer represents the behaviors the system must perform. 3. The quality layer represents non-functional requirements such as performance, security, reliability, maintainability, and observability. 4. The constraint layer represents the technology stack, interfaces, permissions, deployment environment, organizational standards, and compatibility limitations. This hierarchical structure allows for the separation of "what the user wants to do," "what the system needs to achieve," "what quality requirements must be met during implementation," and "what constraints cannot be violated," preventing the Coding Agent from misinterpreting background information as mandatory requirements or mandatory constraints as optional suggestions.
[0096] The following examples illustrate the specific implementation of different clustering requirements:
[0097] In some of these embodiments, such as Figure 4 As shown, step S320, based on preset clustering requirements, clusters the candidate demand units to obtain demand clusters belonging to the corresponding levels, including the following steps:
[0098] Step S321: When the clustering requirement is semantic similarity, the candidate demand units are converted into text structures; the semantic similarity of the converted candidate demand units is calculated using a preset cosine similarity formula to obtain the semantic similarity result. The implementation process is as follows:
[0099] For any two candidate requirement units RU_i and RU_j, first extract their normalized text text_i and text_j. For example, although "The system should support QR code login" and "Users can log in via QR code" are different in expression, their semantics are similar. Call the preset text vectorization model to map the two texts into semantic vectors: E_i=Emb(text_i) and E_j=Emb(text_j).
[0100] Here, Emb(·) represents the text vectorization function, which can be implemented by the embedding model of a large language model, a dedicated semantic vector model, or a local vector model. text_i represents the normalized text of the i-th demand candidate unit. text_j represents the normalized text of the j-th demand candidate unit. E_i represents the semantic vector of the i-th demand candidate unit. E_j represents the semantic vector of the j-th demand candidate unit.
[0101] The semantic similarity is preferably calculated using the cosine similarity formula (other similarity calculation methods may also be used in other embodiments, and there are no restrictions on this), and its expression is:
[0102] S_sem(i,j)=(E_i×E_j) / (||E_i||×||E_j||);
[0103] Where S_sem(i,j) represents the semantic similarity between RU_i and RU_j. E_i×E_j represents the dot product of the two vectors. ||E_i|| and ||E_j|| represent the magnitudes of the two vectors, respectively.
[0104] The higher the value of S_sem(i,j), the closer the two candidate demand units are semantically. When S_sem(i,j) is greater than the preset similarity threshold θ_sem, the two candidate demand units are considered to be semantically similar.
[0105] In this embodiment, the standardized requirement text is transformed into a semantic vector by relying on the text vectorization model, and the semantic association is quantified by cosine similarity, thereby avoiding interference from literal text differences and accurately identifying synonymous requirement units.
[0106] Step S322: When the clustering requirement is structural similarity, the candidate units are converted into a tree structure. The structural similarity of the converted candidate units is calculated using a preset structural similarity formula to obtain the structural similarity result. The implementation process is as follows:
[0107] Since semantic similarity can only determine whether the meaning of texts is similar, but cannot fully determine whether two requirements have the same requirement structure, the candidate requirement units are further converted into a tree structure for comparison. Each candidate requirement unit can be represented as a requirement structure tree (as shown in Table 1), and the nodes of the tree include at least the requirement type, subject, action, object, triggering condition, quantitative indicator, and priority signal.
[0108] For example, "The system should create a login session after the user successfully authorizes by scanning the code" can be converted to: type=functional, subject=system, action=create, object=login session, condition=after the user successfully authorizes by scanning the code, metric=none, priority=must.
[0109] Table 1
[0110]
[0111] In one embodiment, structural similarity can be determined by a combination of attribute similarity and tree edit similarity.
[0112] The expression for attribute similarity is:
[0113] S_attr(i,j)=Σ(w_k×sim(A_i,k,A_j,k)) / Σw_k;
[0114] Where S_attr(i,j) represents the attribute similarity between RU_i and RU_j. A_i,k represents the k-th structural attribute of the i-th demand candidate unit. A_j,k represents the k-th structural attribute of the j-th demand candidate unit. k can take fields such as type, subject, action, object, condition, metric, priority, etc. w_k represents the weight of the k-th attribute. sim(·) represents the similarity of a single attribute, which can be calculated using exact matching, synonym matching, or vector similarity.
[0115] The expression for tree edit similarity is:
[0116] S_tree(i, j)=1-TED(T_i, T_j) / max(|T_i|, |T_j|);
[0117] Where S_tree(i, j) represents the tree edit similarity between RU_i and RU_j. T_i represents the tree structure corresponding to the i-th demand candidate unit. T_j represents the tree structure corresponding to the j-th demand candidate unit. TED(T_i, T_j) represents the tree edit distance between the two trees. |T_i| and |T_j| represent the number of nodes in the two trees, respectively. Tree edit operations include node insertion, deletion, and replacement.
[0118] From the expressions for attribute similarity and tree editing similarity, we can obtain the final expression for structural similarity as follows:
[0119] S_str(i,j)=α×S_attr(i,j)+(1-α)×S_tree(i,j);
[0120] Where S_str(i,j) represents structural similarity; α is the weight coefficient, with a value range of [0,1], and a preferred value of 0.6. When S_str(i,j) is greater than the preset similarity threshold θ_str, the two candidate demand units are considered to be structurally similar.
[0121] This embodiment transforms candidate demand units into a structure tree containing multi-dimensional nodes, integrates attributes and tree editing similarity to calculate structural similarity, compensates for semantic similarity defects, accurately distinguishes differences in demand structure, and improves the accuracy and reliability of demand clustering.
[0122] Step S323: When the clustering requirement is a dependency relationship, the dependency relationship of the candidate demand units is calculated using a preset dependency relationship formula to obtain the dependency relationship result. The implementation process is as follows:
[0123] In this embodiment, dependency means that the implementation, verification, or establishment of one requirement candidate unit requires another requirement candidate unit as a prerequisite. Dependencies are directional. For example, if RU_A is "the system should support QR code login" and RU_B is "the system should create a user session after successful QR code login", then RU_B depends on RU_A because the process of "creating a session after successful QR code login" only exists if the QR code login process exists. Dependencies can be determined from the various signals in Table 2.
[0124] The dependency formula calculates the dependency score, and its expression is:
[0125] D(I,j)=β1×C_explicit+β2×C_condition+β3×C_data+β4×C_process+β5×C_constraint;
[0126] Where D(i,j) represents the dependency strength of RU_j on RU_i. C_explicit represents the explicit dependency word matching score. C_condition represents the condition-outcome matching score. C_data represents the data dependency score. C_process represents the process order dependency score. C_constraint represents the constraint dependency score. β1 to β5 are the weights of each type of dependency signal.
[0127] When D(i,j) is greater than the preset threshold θ_dep, RU_j is determined to depend on RU_i. When determining RU_j's dependence on RU_i, a directed edge RU_i to RU_j can also be established in the demand dependency graph. This directed edge is used for subsequent demand clustering, focus scoring, implementation order inference, and clarification question generation.
[0128] In this embodiment, the multi-dimensional dependency signals are weighted to calculate the dependency strength and a threshold is set to determine the dependency. Directed dependency edges are constructed simultaneously, which can accurately quantify the degree of correlation between requirements.
[0129] Table 2
[0130]
[0131] Step S324: Combining the semantic similarity results, structural similarity results, and relevance results from dependency relationships, cluster the candidate demand units to obtain demand clusters belonging to the corresponding levels. The clustering comprehensive judgment logic is as follows:
[0132] The determination of whether two candidate demand units should be grouped into the same demand cluster is based on a combination of semantic similarity, structural similarity, and dependency relevance. The expression for the comprehensive clustering score is:
[0133] ClusterScore(i,j)=λ1×S_sem(i,j)+λ2×S_str(i,j)+λ3×R_dep(i,j);
[0134] Where ClusterScore(i,j) represents the combined clustering score of RU_i and RU_j. S_sem(i,j) represents semantic similarity. S_str(i,j) represents structural similarity. R_dep(i,j) represents dependency relevance, which can be obtained by normalizing D(i,j), D(j,i), or the maximum of the two. λ1, λ2, and λ3 are weight parameters that can be adjusted according to the project type or historical samples. θ_cluster represents the clustering threshold.
[0135] If ClusterScore(i, j) is greater than θ_cluster, the system merges RU_i and RU_j into the same requirement cluster. If two requirements are semantically dissimilar but have a strong dependency relationship, they are not forcibly merged into the same requirement cluster. Instead, dependency edges are established in the requirement dependency graph for subsequent focus scoring and implementation order determination. This approach can merge duplicate or similar requirements while preserving the sequential dependencies and constraints between different requirements.
[0136] In practical applications, θ_sem can be set to 0.75, 0.80, or automatically adjusted based on historical project samples, and there are no restrictions on this.
[0137] In some of these embodiments, such as Figure 5 As shown, the scoring of each candidate demand in the demand cluster in step S220 includes the following steps:
[0138] Step S221: Construct a focus scoring formula based on the implementation path that affects the coded agent;
[0139] Step S222: Based on the focus scoring formula, score each candidate requirement in the requirement cluster.
[0140] In this embodiment, the main purpose is to accurately determine which candidate requirements will significantly affect the implementation path of CodingAgent. A focus scoring formula is constructed based on this (weights and metrics, where the metrics are shown in Table 3). Then, based on the focus scoring formula, each candidate requirement in the requirement cluster is scored to obtain the focus requirement. A focus requirement refers to a requirement that changes module boundaries, data models, interface design, permission rules, acceptance criteria, or testing strategies.
[0141] Table 3
[0142]
[0143] The expression for the focus scoring formula is as follows:
[0144] The FocusScore is calculated as follows: 0.20 × ExplicitnessScore + 0.20 × SemanticCentralityScore + 0.15 × DependencyScore + 0.15 × ImpactScopeScore + 0.10 × HistoricalSimilarityScore + 0.10 × RiskWeightScore + 0.10 × UserRepetitionScore.
[0145] If the FocusScore is greater than or equal to 0.75, the candidate requirement is marked as a core focus requirement; if the FocusScore is between 0.50 and 0.75, the candidate requirement is marked as a general focus requirement; if it is below 0.50, it is treated as a background or auxiliary requirement. Both core and general focus requirements are focus requirements, but core focus requirements have a higher priority than general focus requirements.
[0146] The indicators in Table 3 were not manually generated, but rather derived from keyword rules, model classification, vector calculation, requirement dependency graphs, code context analysis, historical sample retrieval, risk tags, and frequency statistics. Each score was normalized to the range [0, 1], with higher values indicating a higher likelihood of a focal requirement. This allows for reproducible focal score results for different requirements, distinguishing between core focal requirements, general focal requirements, and auxiliary requirements.
[0147] Take the explicitness score as an example:
[0148] This indicates whether the user explicitly requests this feature. The system can obtain this information through keyword rules and model classification.
[0149] ExplicitnessScore=max(KeywordScore, ModelIntentScore);
[0150] Here, KeywordScore represents the score for explicit keywords, and ModelIntentScore represents the model's classification score for whether the requirement is a strong requirement. Keyword scores are shown in Table 4.
[0151] Table 4
[0152]
[0153] For example, the phrase "Help me make a website that supports QR code login" contains "help me make" and "support," indicating a clear intention to achieve the goal, so an ExplicitnessScore of 0.90 is appropriate.
[0154] Other indicators can be obtained in a similar way, and will not be explained further here.
[0155] In some embodiments, the requirement confirmation method for coded intelligent agents further includes the following steps:
[0156] Based on the preset confidence formula, the confidence level of each demand cluster is calculated;
[0157] The corresponding demand clusters are labeled based on the confidence level.
[0158] Specifically, the confidence formula is expressed as follows:
[0159] Confidence Score = 0.25 × Source Consistency + 0.20 × Clarity of Expression + 0.20 × Strength of Evidence + 0.15 × Context Consistency + 0.10 × Indicator Completeness + 0.10 × User Confirmation;
[0160] Among them, consistency of source indicates whether the dialogue, document, code and strategy are in the same direction; clarity of expression indicates whether the requirement contains a clear subject, action, object and condition; strength of evidence indicates whether there is sufficient original text to support it; consistency of context indicates whether it is consistent with the existing code structure and technology stack; completeness of indicators indicates whether the quality requirement has acceptable indicators; and user confirmation indicates whether the requirement has been fully confirmed by the user.
[0161] Confidence levels can be used to detect different types of demand clusters (Table 5) and accurately distinguish the types of demand clusters.
[0162] Table 5
[0163]
[0164] In some of these embodiments, such as Figure 6 As shown, step S230, which generates implicit requirements based on a preset template and multi-source data, includes the following steps:
[0165] Step S235: Determine the template that matches the multi-source data, and call the matching template to output the corresponding implicit requirements;
[0166] Step S236: Inject mandatory constraints according to the organization strategy in the multi-source data to generate corresponding implicit requirements;
[0167] Step S237: Extract team quality requirements based on similar requirements of historical projects in multi-source data to generate corresponding implicit requirements;
[0168] Step S238: Infer existing constraints based on the code structure in the multi-source data to generate corresponding implicit requirements.
[0169] In Coding Agent scenarios, users often only express surface-level functionality, but the actual implementation also requires implicit requirements such as security, permissions, exception handling, logging, idempotency, compatibility, and testability. In this embodiment, implicit requirements are inferred and generated through templates and organizational strategies, historical projects, and code structure from multi-source data, specifically:
[0170] Determine templates that match the multi-source data, and call the matched templates to output the corresponding implicit requirements. Match templates based on project type, for example: Web APIs require authentication, rate limiting, error codes, idempotency, and audit logs; match templates based on technology stack, for example: React projects require route state, form validation, and API error display; match templates based on domain, for example: payment scenarios require idempotent keys, risk control, auditing, and reconciliation.
[0171] Inject mandatory constraints based on organizational policies from multi-source data to generate corresponding implicit requirements; for example: security logs, permission baselines, compliance requirements, and coding standards.
[0172] Extract team quality requirements based on similar requirements from historical projects in multi-source data to generate corresponding implicit requirements.
[0173] Existing constraints can be inferred from the code structure in multi-source data to generate corresponding implicit requirements; for example: authentication middleware, testing framework, interface style, and data model.
[0174] For each implicit requirement, a necessity score can be calculated. If the necessity score is greater than or equal to 0.85 and originates from an organizationally mandated policy, it is marked as a necessary implicit requirement and is included in the requirement baseline by default. If the score is between 0.60 and 0.85, it is marked as a general implicit requirement and is presented to the user for confirmation as a suggestion. If the score is below 0.60, it is marked as a general implicit requirement and is only recorded as background knowledge, not included in the current clarification question. These implicit requirements can be used to adjust the clarification question and further optimize its accuracy. In other embodiments, implicit requirements with scores between 0.60 and 0.85 can also be marked as necessary implicit requirements, and this is not a limitation.
[0175] In some of these embodiments, such as Figure 7 As shown, the generation of clarification questions in step S240 includes the following steps:
[0176] Step S241: Calculate the problem value of each candidate clarification question based on the preset problem value formula;
[0177] Step S242: Select clarification questions from the candidate clarification questions based on the question value.
[0178] In this embodiment, questions are not asked about all uncertainties. Instead, the question value is calculated using a question value formula, selecting the fewest but highest-valued questions. The expression for the question value formula is:
[0179] QuestionValue = 0.30 × ImplementationImpact + 0.25 × RiskReduction + 0.20 × UncertaintyReduction + 0.15 × DependencyCoverage + 0.10 × UserEffortInverse;
[0180] Prioritize asking questions that may change the database model, permission model, core interfaces, third-party dependencies, acceptance criteria, or other implicit requirements. Select 3 to 5 questions for each round; merge similar questions into a batch confirmation table; low-risk questions that will not affect the implementation direction are only recorded as hypotheses.
[0181] The indicators in the problem value formula are not manually assigned, but calculated based on objective information such as demand structure, risk tags, dependency graphs, number of candidate explanations, and user response costs. Each score is normalized to the range [0, 1], with higher values indicating a greater likelihood of prioritizing the problem for user feedback. This allows for reproducible focus scoring results for different needs, distinguishing between core focus needs, general focus needs, and auxiliary needs.
[0182] Take implementation impact as an example:
[0183] This indicates whether the answer to the question will change the implementation path of the Coding Agent. It can be calculated based on the modules, interfaces, data models, business branches, and test scope affected by the associated requirements of the question. The expression is:
[0184] ImplementationImpact=0.30×ModuleImpact+0.25×DataModelImpact+0.20×InterfaceImpact+0.15×BehaviorBranchImpact+0.10×TestImpact.
[0185] Specifically, ModuleImpact indicates whether it affects multiple code modules, such as the frontend, backend, authentication, account, and logging. DataModelImpact indicates whether it affects database tables, fields, unique constraints, and state enumerations. InterfaceImpact indicates whether it affects APIs, callback interfaces, and third-party interfaces. BehaviorBranchImpact indicates whether it determines different business process branches. TestImpact indicates whether it affects test cases, acceptance scenarios, or the scope of automated testing.
[0186] Other indicators can be obtained in a similar way, and will not be explained further here.
[0187] By using the above methods, we can objectively distinguish between "questions that must be asked" and "questions that are not worth interrupting the user," thereby reducing ineffective follow-up questions and ensuring that key issues affecting the implementation direction are identified first. Furthermore, it can automatically complete implicit requirements such as security, permissions, logging, idempotency, and exception handling, reducing rework and defects caused by users omitting key constraints.
[0188] The verification artifacts are generated based on key and implicit requirements, enabling the Coding Agent to have acceptance criteria before coding. Verification artifacts include BDD acceptance scenarios, test case drafts, formal assertions, acceptance matrices, and Agent execution constraints. These verification artifacts may not immediately become executable test code, but they serve as structured inputs for the Coding Agent to generate unit tests, integration tests, and manual acceptance checklists.
[0189] The specific process for generating validation artifacts can be as follows: read the focus requirements and implicit requirements; filter the set of requirements to be validated; determine the validation objectives for each requirement; select a validation template based on the requirement type; fill in the template fields to generate BDD acceptance scenarios; generate test case drafts based on the BDD scenarios; generate formal assertions based on constraint classes, quality classes, and high-risk requirements; establish a mapping relationship between requirements and validation artifacts to generate an acceptance matrix; extract Agent execution constraints from requirements, constraints, and assertions; and output the ValidationArtifact set.
[0190] It can be assumed that the core or general focus requirements are selected as priority, as well as implicit requirements whose necessary scores are higher than the preset necessary score threshold; then, a preset verification template is matched according to the requirement type, action, object, triggering condition and quantitative indicator; then, the requirement structure fields are filled into the template to generate BDD scenario, test draft, formal assertion, acceptance matrix and Agent execution constraints.
[0191] In some embodiments, step S250, which generates a requirement baseline based on the updated requirement cluster, implicit requirements, and verification artifacts, includes the following steps:
[0192] Under a preset priority, a structured requirement baseline is generated based on the updated requirement clusters, implicit requirements, and verification artifacts;
[0193] Specifically, after the user answers the clarification question, the requirement cluster is updated. Under a preset priority, a structured requirement baseline is generated based on the updated requirement cluster, implicit requirements, and verification artifacts. The requirement baseline includes at least confirmed requirements, open assumptions, rejected or delayed requirements, verification artifacts, and agent execution constraints (as shown in Table 6). This approach preserves evidence of requirement sources, confidence levels, risks, and user confirmation status, improving the controllability and auditability of AICoding across various application environments.
[0194] The priority is as follows: core focus requirements have a higher priority than general focus requirements; necessary implicit requirements have a higher priority than general implicit requirements; that is, code related to core focus requirements will be generated first.
[0195] Table 6
[0196]
[0197] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0198] This embodiment also provides a requirements confirmation system for coded intelligent agents, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as described above. The terms "module," "unit," "subunit," etc., used below can refer to a combination of software and / or hardware that performs a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0199] Figure 8 This is a structural block diagram of the requirement confirmation system for coded intelligent agents in this embodiment, as shown below. Figure 8 As shown, the system includes: a user input layer 810, a requirement confirmation layer 820, and a coding execution layer 830; wherein, the user input layer 810 is connected to the coding execution layer 830 through the requirement confirmation layer 820.
[0200] User input layer 810 is used to input the user's AI Coding request;
[0201] The requirement confirmation layer 820 is used to execute any of the above method embodiments;
[0202] The coding execution layer 830 is used to generate target code based on the requirements baseline.
[0203] Specifically, the method embodiment can be considered to be applied to the requirement confirmation layer 820, which adds a requirement confirmation layer 820 for requirement focus anchoring and confirmation between the user input layer 810 and the coding execution layer 830 of the Coding Agent. This requirement confirmation layer 820 converts multi-source data into structured requirement candidate units, calculates requirement focus scores and confidence levels, completes implicit requirements, generates verification artifacts and clarification questions, and outputs a requirement baseline after user confirmation; it forms a requirement baseline before coding, preventing the Coding Agent from directly using unconfirmed inferences as the basis for implementation. Furthermore, compared to ordinary requirement summaries, this application establishes a structured baseline requirement representation through RequirementUnit, RequirementCluster, FocusScore, and ConfidenceScore, making it capable of scoring, filtering, tracing, and verifying.
[0204] This requirement verification layer 820 can be implemented as an SDK, Skill, plugin, middleware, IDE extension, Agent Runtime component, or server-side API. It can be embedded into existing Coding Agents or used as a pre-requirement analysis module for enterprise internal software delivery intelligent agent platforms.
[0205] In the coding execution layer 830, the process of generating target code based on the requirement baseline is as follows: generating an implementation plan based on the requirement baseline; executing coding and testing; writing back the requirement status based on the test and acceptance results, thereby realizing a closed-loop call in the Coding Agent, which can be embedded into the automated workflow of the Coding Agent and is suitable for AI Coding scenarios with rapid iteration.
[0206] For example, the process for logging in by scanning a QR code is as follows:
[0207] The user inputs, "Help me create a website that supports QR code login, preferably simple, so users can log in by scanning a QR code." The system reads that the project contains the frontend / login and backend / auth directories, and reads the organization's security guidelines, finding that successful and failed authentication events must be logged in the audit log.
[0208] The system first extracts candidate requirements: users can enter the website by scanning a QR code; the system should generate a QR code for login; the system should handle authorization callbacks; the system should associate openid with the site account; login failure should have an understandable error message; and authentication success and failure events should be recorded in the audit log.
[0209] After calculating the focus score, the system marks "Support QR code login" and "Handle authorization callback" as core focus requirements; marks "Automatically create accounts" as a high-impact but low-confidence requirement; and incorporates "Login audit logs" as an organizational policy constraint into the requirement baseline.
[0210] The system then generates clarification questions: Should an account be automatically created after an unregistered user scans the QR code? Should a single account be linked to multiple accounts? Should audit logs be recorded when login fails? After the user answers, the system solidifies the final requirements baseline and outputs acceptance scenarios and test drafts to the Coding Agent.
[0211] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0212] This embodiment also provides a computer device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0213] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0214] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0215] S1: Acquire multi-source data related to the user's AI Coding request; and transform and cluster the multi-source data to obtain demand clusters;
[0216] S2, score each candidate requirement in the requirement cluster, and mark the corresponding candidate requirements based on the scoring results to obtain the focus requirement;
[0217] S3 generates implicit requirements based on preset templates and multi-source data; and generates verification artifacts based on focus requirements and implicit requirements.
[0218] S4, generate clarification questions, and update the requirement cluster based on user responses to the clarification questions;
[0219] S5 generates a requirement baseline based on the updated requirement clusters, implicit requirements, and verification artifacts.
[0220] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0221] Furthermore, in conjunction with the requirement verification method for coded intelligent agents provided in the above embodiments, this embodiment can also provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the requirement verification methods for coded intelligent agents described in the above embodiments.
[0222] It should be noted that all information and data involved in this application are authorized by the user or fully authorized by all parties and will be used legally.
[0223] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0224] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0225] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0226] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A method for requirement confirmation for coded intelligent agents, characterized in that, include: Acquire multi-source data related to the user's AI Coding request; The multi-source data is then transformed and clustered to obtain demand clusters; Each candidate requirement in the requirement cluster is scored, and the corresponding candidate requirement is marked based on the scoring results to obtain the focus requirement; Based on the preset template and the multi-source data, implicit requirements are generated; Based on the stated key requirements and the implied requirements, a verification workpiece is generated; Generate clarification questions, and update the requirement cluster based on the user's response to the clarification questions; A requirement baseline is generated based on the updated requirement cluster, the implicit requirements, and the verification artifact.
2. The requirement confirmation method for coded intelligent agents according to claim 1, characterized in that, Acquire multi-source data related to the user's AI Coding request, including: Obtain the AI Coding request submitted by the user; Based on the AI Coding request, relevant multi-source data is collected; the multi-source data includes user dialogues, requirement documents, code structure, organizational strategies, and historical projects.
3. The requirement confirmation method for coded intelligent agents according to claim 1, characterized in that, The multi-source data is transformed and clustered to obtain demand clusters, including: The multi-source data is converted into demand candidate units with source evidence; Based on preset clustering requirements, the candidate demand units are clustered to obtain demand clusters belonging to the corresponding levels; the clustering requirements are at least one or more of semantic similarity, structural similarity, or dependency relationship; the levels include target layer, functional layer, quality layer, and constraint layer.
4. The requirement confirmation method for coded intelligent agents according to claim 3, characterized in that, Based on preset clustering requirements, the candidate demand units are clustered to obtain demand clusters belonging to the corresponding levels, including: When the clustering requirement is the semantic similarity, the candidate demand units are converted into text structures; the semantic similarity of the converted candidate demand units is calculated using a preset cosine similarity formula to obtain the semantic similarity result; When the clustering requirement is the structural similarity, the candidate demand units are converted into a tree structure, and the structural similarity of the converted candidate demand units is calculated using a preset structural similarity formula to obtain the structural similarity result. When the clustering requirement is the dependency relationship, the dependency relationship of the candidate demand unit is calculated using a preset dependency relationship formula to obtain the dependency relationship result; By combining the semantic similarity results, the structural similarity results, and the relevance in the dependency relationship results, the candidate demand units are clustered to obtain demand clusters belonging to the corresponding levels.
5. The requirement confirmation method for coded intelligent agents according to claim 1, characterized in that, Scoring is performed on each candidate requirement in the requirement cluster, including: Based on the implementation path that affects the coded agent, a focus scoring formula is constructed; Based on the aforementioned focus scoring formula, each candidate requirement in the requirement cluster is scored.
6. The requirement confirmation method for coded intelligent agents according to claim 1, characterized in that, The method further includes: Based on a preset confidence formula, the confidence level of each demand cluster is calculated; The corresponding demand clusters are labeled based on the confidence level.
7. The requirement confirmation method for coded intelligent agents according to claim 1, characterized in that, Based on the preset template and the multi-source data, implicit requirements are generated, including: Determine the template that matches the multi-source data, and call the matching template to output the corresponding implicit requirement; Forced constraints are injected based on the organization strategy in the multi-source data to generate corresponding implicit requirements; Based on the similar requirements of historical projects in the multi-source data, the team's quality requirements are extracted to generate corresponding implicit requirements; Existing constraints are inferred from the code structure in the multi-source data to generate corresponding implicit requirements.
8. The requirement confirmation method for coded intelligent agents according to claim 1, characterized in that, Generate clarifying questions, including: Based on a pre-defined problem value formula, the problem value of each candidate clarification problem is calculated. Clarification questions are selected from the candidate clarification questions based on the value of the question.
9. The requirement confirmation method for coded intelligent agents according to claim 1, characterized in that, Based on the updated requirement cluster, the implicit requirements, and the verification artifact, a requirement baseline is generated, including: Under a preset priority, a structured requirement baseline is generated based on the updated requirement cluster, the implicit requirements, and the verification artifact; The priority is as follows: the core focus requirement among the focus requirements has a higher priority than the general focus requirement among the focus requirements; the necessary implicit requirement among the implicit requirements has a higher priority than the general implicit requirement among the implicit requirements. The demand baseline includes at least confirmed demands, open hypotheses, rejected or delayed demands, validation artifacts, and agent execution constraints.
10. A requirement confirmation system for coded intelligent agents, characterized in that, include: The system comprises a user input layer, a requirement confirmation layer, and a coding execution layer; wherein the user input layer is connected to the coding execution layer through the requirement confirmation layer. The user input layer is used to input the user's AI Coding request; The requirement confirmation layer is used to perform the steps of the requirement confirmation method for coded intelligent agents as described in any one of claims 1 to 9; The encoding execution layer is used to generate target code based on the requirement baseline.
