{# ============================================================================ #}
{# Template: review_xsd_retry.txt                                               #}
{# Version: 3.0 - File-based context to avoid prompt bloat                      #}
{# ============================================================================ #}
{#                                                                             #}
{# PURPOSE:                                                                    #}
{#   Retry prompt when XML validation fails during review phase.                #}
{#   XSD schema and last output are written to files to keep prompt small.      #}
{#                                                                             #}
{# VARIABLES:                                                                  #}
{#   {{XSD_ERROR}} - XSD validation error message (required)                    #}
{#                                                                             #}
{# FILES TO READ:                                                               #}
{#   .agent/tmp/issues.xsd       - The XSD schema your output must conform to   #}
{#   .agent/tmp/last_output.xml  - Your previous invalid output                 #}
{#                                                                             #}
{# OUTPUT FORMAT:                                                               #}
{#   Valid <ralph-issues> XML conforming to the XSD schema                     #}
{# ============================================================================ #}

{{> shared/_unattended_mode}}

Your XML at `{{ISSUES_XML_PATH}}` failed validation.

ERROR: {{XSD_ERROR}}

Fix `{{ISSUES_XML_PATH}}` based on `{{ISSUES_XSD_PATH}}`.

IMPORTANT: Use file editing tools to modify the XML file directly. Do NOT output the corrected XML in your response.
