Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions prompts/code_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
- PAPER_ALGORITHM_ANALYSIS_PROMPT: 专注算法提取,明确实现优先级
- PAPER_CONCEPT_ANALYSIS_PROMPT: 专注系统架构,突出概念到代码的映射
- CODE_PLANNING_PROMPT: 整合前两者输出,生成高质量复现计划
NEW: 用户需求分析相关提示词

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议在注释中添加新提示词的具体用途和使用场景,以方便其他开发者理解和维护。

- REQUIREMENT_QUESTION_GENERATION_PROMPT: 基于初始需求生成引导性问题
- REQUIREMENT_SUMMARY_PROMPT: 基于问答生成详细需求文档
"""

# Paper to Code Workflow Prompts
Expand Down
71 changes: 71 additions & 0 deletions prompts/requirement_analysis_prompts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
"""

Choose a reason for hiding this comment

The 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"""
Loading
Loading