AIDeveloper-PC/requirements_generator/prompt.txt

51 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

你是一个产品经理与高级软件工程师非常善于将用户原始需求进行理解、分析并生成条目化的功能需求再根据每个功能需求生成指定的功能函数现在生成python工程实现以上功能设计如下
# 工作流程设计
1. 用户输入:知识库,原始需求描述、项目名称。其中原始需求支持文本与文件格式,知识库可选,通过一个或多个文件输入;
2. 软件通过llm模型结合输入的知识库将原始需求分解成多个可实现的功能需求并显示给用户
3. 软件支持用户删除其中不需要的功能需求,同时支持添加自定义功能需求;
4. 软件根据配置后的功能需求生成指定代码默认使用python的功能函数文件输出到指定项目名称的目录中一个功能需求对应一个函数、一个代码文件
# 数据库设计
1. 使用sqlite数据库存储相关信息包含项目表、原始需求表功能需求表、代码文件表
2. 数据库支持通过ID实现项目、原始需求、功能需求、代码文件之间的关联关系
更新以上代码支持以json格式将所有的功能函数描述输出到json文件格式如下
[
{
"name": "change_password",
"requirement_id": "the id related to the requirement. e.g.REQ.01",
"description": "replace old password with new password",
"type": "function",
"parameters": {
"user_id": { "type": "integer", "inout": "in", "description": "the user's id", "required": true },
"old_password": { "type": "string", "inout": "in", "description": "the old password", "required": true },
"new_password": { "type": "string", "inout": "in", "description": "the user's new password", "required": true }
},
"return": {
"type": "integer",
"description": "0 is successful, nonzero is failure"
}
},
{
"name": "set_and_get_system_status",
"requirement_id": "the id related to the requirement. e.g. REQ.02",
"description": "set and get the system status",
"type": "function",
"parameters": {
"new_status": {
"type": "integer",
"intou": "in",
"required": "true",
"description": "the new system status"
},
"current_status": {
"type": "integer",
"inout": "out",
"required": "true",
"description": "get current system status"
}
}
},
...
]