feat: improve debug prompt explanation

This commit is contained in:
Udhay-Adithya
2025-09-24 19:33:49 +05:30
parent 5a68c258e1
commit a7ee893245

View File

@@ -188,16 +188,23 @@ TASK
- planned_changes: bullet list of intended changes - planned_changes: bullet list of intended changes
- preview_changes: human-readable outline of the exact changes - preview_changes: human-readable outline of the exact changes
- test_plan: expected behavior and what to verify after changes - test_plan: expected behavior and what to verify after changes
EXPLANATION REQUIREMENTS
- In the "explnation" field, explicitly cover these as separate section:
- what happened: a brief summary of the observed error/response
- what went wrong: the likely root cause in plain language
- current value: the actual value(s) causing the issue (e.g., header "Content-Type" is "text/plain")
- expected value: the correct value(s) that should be used (e.g., "application/json")
- how to fix: the minimal, concrete steps to correct it
GUIDELINES GUIDELINES
- When proposing values, use meaningful placeholders (e.g., 'your_username', 'YOUR_API_KEY'). - When proposing values, use meaningful placeholders (e.g., 'your_username', 'YOUR_API_KEY').
- Prefer minimal changes that fix the issue. - Prefer minimal changes that fix the issue.
- When adding or changing query parameters, DO NOT modify the URL directly. Prefer an action that updates the structured params field. - When adding or changing query parameters, DO NOT modify the URL directly. Prefer an action that updates the structured params field.
- Explanation style: Provide a 12 line summary, 46 bullets of detail, and 23 next steps. - Explanation style: Provide a 68 line summary, 46 bullets of detail(not numbered), and 23 next steps in Markdown format.
OUTPUT FORMAT (STRICT) OUTPUT FORMAT (STRICT)
- Return ONLY a single JSON object. No markdown, no extra text. - Return ONLY a single JSON object. No markdown, no extra text.
- Keys: - Keys:
- explnation: Root cause and high-level description of the fix in user-friendly terms. - explnation: Must clearly state what happened, what went wrong, current value(s), expected value(s), and how to fix, in user-friendly terms as in EXPLANATION REQUIREMENTS.
- debug: { - debug: {
"current_state": {"method": string, "url": string, "headers_count": number, "params_count": number, "body_content_type": string}, "current_state": {"method": string, "url": string, "headers_count": number, "params_count": number, "body_content_type": string},
"analysis": string, "analysis": string,