speech_type_analysis = """
You are analyzing email conversations where the user is represented as 'me.' Your task is to create a detailed, practical writing style guide by analyzing messages from 'me.' Focus on providing specific, actionable patterns with clear examples.

Key Analysis Requirements:
- Show complete message context when relevant
- For each pattern identified, provide clear examples
- Identify situational adaptations in writing style
- Focus on concrete, replicable patterns

Analyze and document:

1. **Response Structure Analysis:**
   - Opening formats and when each is used
   - Core message structure and organization
   - Closing formats and signature variations
   - Provide examples showing context-based adaptations

2. **Formality Levels:**
   Document patterns for:
   - Formal communications (e.g., professors, administrators)
   - Professional communications (e.g., colleagues, employers)
   - Peer communications
   Show how language and structure adapt to each level

3. **Task-Specific Patterns:**
   Analyze handling of:
   - Making requests
   - Following up
   - Problem reporting
   - Scheduling
   - Information sharing
   For each, document:
   - Standard structure
   - Key phrases and transitions
   - Level of detail included
   - Common adaptations

4. **Message Elements:**
   Document patterns in:
   - Paragraph structure and length
   - Use of bullet points or lists
   - Technical language usage
   - Acknowledgments and transitions
   
For each pattern, use this format:
Pattern: [Description]
Usage Context: [When/why used]
Example:
```
[Complete message example]
```
Key Elements:
- [Breakdown of important components]
- [Situational adaptations]

The goal is to create a practical guide that captures the user's consistent writing patterns while showing how they adapt to different situations and recipients.
"""

email_response_analysis = """
You are analyzing emails to determine if they require a response. Your task is simple: decide if the email needs a response or not.

Provide your analysis in this exact format:

<ANALYSIS>
Reasoning:
[Brief explanation of why this email does or doesn't need a response]

Decision:
<NEEDS_RESPONSE>true/false</NEEDS_RESPONSE>
</ANALYSIS>

Guidelines:
- true: Email explicitly or implicitly requires a response
- false: No response needed (newsletters, notifications, FYI messages, etc.)

Remember to consider:
- Is there a question or request?
- Is acknowledgment expected?
- Is it an automated message?
- Is it part of an ongoing conversation?
"""

draft_prompt_modification = """
You are a writing style expert. Your task is to modify an existing email drafting prompt by incorporating new requirements while maintaining consistency.

Current Prompt:
{current_prompt}

New Requirements:
{new_requirements}

Rules for Modification:
1. Maintain the professional tone of the original prompt
2. When there are conflicts between the current prompt and new requirements, prioritize the new requirements
3. Ensure the modified prompt remains clear and actionable
4. Preserve any useful elements from the original prompt that don't conflict with new requirements

Provide your response in this format:

<MODIFIED_PROMPT>
[Your modified prompt here]
</MODIFIED_PROMPT>
"""

email_response_requirements_analysis = """
You are analyzing an email to determine if it can be answered immediately or requires user input. 

Analyze the email for:
1. Simple acknowledgments or confirmations that can be handled immediately
2. Questions requiring user-specific information or decisions
3. Requests needing user's personal input or preferences
4. References to information only the user would know

Provide your analysis in this exact format:

<ANALYSIS>
Reasoning: [Explain if this needs user input or can be auto-responded]

Decision:
<RESPONSE_TYPE>AUTO_RESPOND|NEEDS_USER_INPUT</RESPONSE_TYPE>

Required Information:
<REQUIRED_INFO>
[If NEEDS_USER_INPUT, list specific information needed from user]
[If AUTO_RESPOND, leave empty]
</REQUIRED_INFO>

Search Terms:
<SEARCH_TERMS>
["term1", "term2", "term3"]
</SEARCH_TERMS>
</ANALYSIS>

Examples:
- AUTO_RESPOND: Meeting confirmations, receipt acknowledgments, simple thank-you responses
- NEEDS_USER_INPUT: Schedule preferences, project decisions, personal opinions
"""

draft_response_generation = """
Using the following email drafting guidelines:
{draft_prompt}

Create a complete email response to this thread:
{email_thread}

The response should include all necessary components (greeting, body, closing, signature) while maintaining the specified tone.
Respond in this format:

<DRAFT_RESPONSE>
[Complete email with greeting, body, closing, and signature]
</DRAFT_RESPONSE>
"""
