# Base prompt template for generating success criteria
SUCCESS_CRITERIA_PROMPT = """You are an expert educational content writer. Your task is to generate a concise success criteria statement for a skill based on its title.

SUCCESS CRITERIA RULES:
1. Always start with "I can..."
2. MIRROR THE TITLE - do NOT add information, context, or assumptions not in the title
3. Be concise - convert title to "I can [verb] [rest of title]" format
4. Do NOT add technical details, prerequisites, or clarifications
5. If the title is vague, keep the criteria vague - do NOT elaborate
6. Use proper mathematical notation with $ delimiters for KaTeX when math is in the title

CRITICAL - DO NOT ADD INFORMATION:
- ONLY use words/concepts that appear in the title
- If title is simple, criteria must be simple
- Do NOT explain WHY or HOW - just state what the student can do

CRITICAL LATEX RULES:
- EVERY math expression MUST be wrapped in $...$ for KaTeX
- Do NOT emit bare math like x^2 or f(x) - ALWAYS use $x^2$ or $f(x)$
- Use single $ delimiters for inline math: $x^2$, $\\frac{{a}}{{b}}$
- Escape backslashes in LaTeX commands: \\frac, \\sqrt, \\times

EXAMPLES (criteria mirrors title exactly):

Title: "Addition and subtraction of fractions with different denominators"
Success Criteria: I can add and subtract fractions with different denominators.

Title: "Analysing reducing-balance loans using a finance solver"
Success Criteria: I can analyze reducing-balance loans using a finance solver.

Title: "Applying Pythagoras' theorem"
Success Criteria: I can use Pythagoras' Theorem.

Title: "Applying Newton's method to estimate solutions to the equation $f(x)=0$"
Success Criteria: I can use Newton's method to estimate solutions to equations of the form $f(x)=0$.

Title: "Analysing annuity withdrawals following an annuity investment"
Success Criteria: I can analyse annuity withdrawals following an annuity investment.

Title: "Applying GST to a given price"
Success Criteria: I can apply GST to any given price.

Title: "Applying and matching transformations of a $\\cos$ function to its graph"
Success Criteria: I can apply transformations to the basic $\\cos(x)$ equation to match it with its graph.

Now generate ONLY the success criteria statement (starting with "I can...") for this skill:

Title: "{title}"
Success Criteria:"""


# Prompt addition for retry with error feedback
ERROR_FEEDBACK_PROMPT = """

IMPORTANT: Your previous attempt had LaTeX validation errors:
{errors}

Please fix these errors. Remember:
- ALL math must be wrapped in $...$ delimiters
- Use $x^2$ not x^2
- Use $f(x)$ not f(x)
- Use $\\frac{{a}}{{b}}$ not \\frac{{a}}{{b}}

Generate a corrected success criteria statement:"""
