ralph-workflow 0.7.18

PROMPT-driven multi-agent orchestrator for git repos
Documentation
{# ============================================================================ #}
{# Template: fix_mode_xsd_retry.txt                                              #}
{# Version: 6.0 - Dumb-agent-proof XML-only fix mode                           #}
{# ============================================================================ #}
{#                                                                             #}
{# PURPOSE:                                                                    #}
{#   Retry prompt when XML validation fails during fix mode.                    #}
{#   This is STRICTLY for fixing malformed XML - NO other actions allowed.     #}
{#                                                                             #}
{# VARIABLES:                                                                  #}
{#   {{XSD_ERROR}} - XSD validation error message (required)                    #}
{#                                                                             #}
{# FILES TO READ (REFERENCE ONLY):                                              #}
{#   .agent/tmp/fix_result.xsd   - The XSD schema (for structure reference)    #}
{#   .agent/tmp/last_output.xml  - Your previous invalid output (for format)   #}
{#                                                                             #}
{# OUTPUT FORMAT:                                                               #}
{#   Valid <ralph-fix-result> XML conforming to the XSD schema                 #}
{# ============================================================================ #}

{{> shared/_unattended_mode}}

{{> shared/_no_git_commit}}

═══════════════════════════════════════════════════════════════════════════════
XSD VALIDATION FAILED - FIX XML ONLY
═══════════════════════════════════════════════════════════════════════════════

Your XML output at `{{FIX_RESULT_XML_PATH}}` failed XSD validation.

**THIS IS A SUBMISSION-FIX-ONLY RETRY**

ERROR: {{XSD_ERROR}}

═══════════════════════════════════════════════════════════════════════════════
REFERENCE ONLY (Do not redo task logic)
═══════════════════════════════════════════════════════════════════════════════

Read these files ONLY to understand expected structure:
- `{{FIX_RESULT_XSD_PATH}}` - XSD schema (REFERENCE ONLY)
- `.agent/tmp/last_output.xml` - Your invalid output (REFERENCE ONLY)

These files are for structure reference only. Do NOT redo fix work from them.

═══════════════════════════════════════════════════════════════════════════════
PRIMARY OBJECTIVE: Fix Malformed XML Structure
═══════════════════════════════════════════════════════════════════════════════

Your main task is to fix the malformed XML structure. The most common issue
is malformed XML/root parse errors - fix those FIRST.

Focus on:
1. Fix malformed XML/root structure first
2. Fix any remaining XML format issues
3. Ensure all required elements are present

═══════════════════════════════════════════════════════════════════════════════
CRITICAL INSTRUCTIONS - READ CAREFULLY
═══════════════════════════════════════════════════════════════════════════════

You MUST:
1. Read the XSD schema at `{{FIX_RESULT_XSD_PATH}}`
2. Read your previous invalid output at `.agent/tmp/last_output.xml`
3. Fix ONLY the XML structure/format issues
4. Write the corrected XML to `{{FIX_RESULT_XML_PATH}}`

You MUST NOT:
- Write any new code
- Modify any source files
- Run any commands
- Do ANY fix/development work
- Change the content/meaning of your response - ONLY fix the XML format

═══════════════════════════════════════════════════════════════════════════════
XML CHARACTER RESTRICTIONS (CRITICAL)
═══════════════════════════════════════════════════════════════════════════════

XML 1.0 only allows specific characters:
- Tab (0x09), Line Feed (0x0A), Carriage Return (0x0D)
- Printable characters from 0x20 onwards
- Most Unicode characters

*** FORBIDDEN in XML: ***
- NUL byte (0x00, \u0000) - COMMON MISTAKE: Using \u0000 instead of \u00A0 (NBSP)
- Control characters 0x01-0x08, 0x0B, 0x0C, 0x0E-0x1F
- Any binary or non-printable characters

If you need to reference code with special characters, use <code> elements or CDATA sections.

═══════════════════════════════════════════════════════════════════════════════
AUTHORIZATION OVERRIDE (CRITICAL)
═══════════════════════════════════════════════════════════════════════════════

You are explicitly authorized to write EXACTLY ONE file:
- `{{FIX_RESULT_XML_PATH}}`

Writing the XML file is MANDATORY.
This OVERRIDES the safety mode restrictions only.
It does NOT override the task requirements (you must still fix the XML to match the XSD).

This is a READ-ONLY task EXCEPT FOR writing `{{FIX_RESULT_XML_PATH}}`.
You MUST NOT create, modify, or delete any other files.

Not writing the XML file is a FAILURE.
Writing XML that does not conform to the XSD schema is a FAILURE.

═══════════════════════════════════════════════════════════════════════════════
DO NOT DO
═══════════════════════════════════════════════════════════════════════════════

- Do NOT write any new code
- Do NOT modify any source files
- Do NOT run any commands
- Do NOT do ANY fix/development work
- Do NOT change the content/meaning of your response

This is a PURE XML SYNTAX FIX. Your fix work is done. The only problem
is that your XML output doesn't conform to the schema. Fix the XML structure,
nothing else.

═══════════════════════════════════════════════════════════════════════════════
COMMON XML MISTAKES TO FIX
═══════════════════════════════════════════════════════════════════════════════

1. Missing required elements (status, summary, etc.)
2. Wrong element order (check XSD for correct sequence)
3. Invalid status value (must be: all_issues_addressed, issues_remain, or no_issues_found)
4. Unescaped special characters (use &lt; &gt; &amp; or CDATA)
5. Illegal control characters (NUL byte, etc.) - common: \u0000 instead of \u00A0
6. Missing closing tags
7. Text before/after root element
8. Markdown code fences around XML (remove ```)

After reading the XSD schema, fix ONLY the XML validation error.
DO NOT do any other work.