-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: add user requirements analysis feature #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wwch123
wants to merge
3
commits into
main
Choose a base branch
from
feat/user-requirements-analysis
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| """ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 建议在模块级别添加详细的文档字符串,说明该模块包含的提示词模板及其用途。 |
||
| User requirement analysis related prompt templates | ||
| Contains prompt templates for requirement analysis Agent, supporting question generation and requirement summarization functions. | ||
| """ | ||
|
|
||
| # ======================================== | ||
| # User requirement analysis related prompt templates | ||
| # ======================================== | ||
|
|
||
| REQUIREMENT_QUESTION_GENERATION_PROMPT = """You are a professional requirement analysis expert, skilled at helping users refine project requirements through precise questions. | ||
| Please generate 1-3 precise guiding questions based on user's initial requirement description to help users provide more detailed information. | ||
| User Initial Requirements: | ||
| {user_input} | ||
| Please generate a JSON format question list, each question contains the following fields: | ||
| - category: Question category (such as "Functional Requirements", "Technology Selection", "Performance Requirements", "User Interface", "Deployment Environment", etc.) | ||
| - question: Specific question content | ||
| - importance: Importance level ("High", "Medium", "Low") | ||
| - hint: Question hint or example (optional) | ||
| Requirements: | ||
| 1. Questions should be highly targeted, based on user's specific requirement scenarios | ||
| 2. Cover key decision points for project implementation | ||
| 3. Avoid overly technical questions, maintain user-friendliness | ||
| 4. Questions should have logical correlation | ||
| 5. Ensure questions help users think about important details they might have missed | ||
| Please return JSON format results directly, without including other text descriptions.""" | ||
|
|
||
| REQUIREMENT_SUMMARY_PROMPT = """You are a professional technical requirement analyst, skilled at converting user requirement descriptions into detailed technical specification documents. | ||
| Please generate a detailed project requirement document based on user's initial requirements and supplementary responses. | ||
| User Initial Requirements: | ||
| {initial_input} | ||
| User Supplementary Responses: | ||
| {answers_text} | ||
| Please generate a concise requirement document focusing on the following core sections: | ||
| ## Project Overview | ||
| Brief description of project's core goals and value proposition | ||
| ## Functional Requirements | ||
| Detailed list of required features and functional modules: | ||
| - Core functionalities | ||
| - User interactions and workflows | ||
| - Data processing requirements | ||
| - Integration needs | ||
| ## Technical Architecture | ||
| Recommended technical design including: | ||
| - Technology stack and frameworks | ||
| - System architecture design | ||
| - Database and data storage solutions | ||
| - API design considerations | ||
| - Security requirements | ||
| ## Performance & Scalability | ||
| - Expected user scale and performance requirements | ||
| - Scalability considerations and constraints | ||
| Requirements: | ||
| 1. Focus on what needs to be built and how to build it technically | ||
| 2. Be concise but comprehensive - avoid unnecessary implementation details | ||
| 3. Provide clear functional specifications and technical architecture guidance | ||
| 4. Consider project feasibility and technical complexity""" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议在注释中添加新提示词的具体用途和使用场景,以方便其他开发者理解和维护。