{# ============================================================================ #}
{# Template: fix_mode.txt                                                       #}
{# Version: 1.0                                                                  #}
{# ============================================================================ #}
{#                                                                             #}
{# PURPOSE:                                                                    #}
{#   Prompt for fix mode to address issues found during review.                 #}
{#   Agent reads ISSUES.md and modifies source code to fix issues.              #}
{#                                                                             #}
{# WHEN USED:                                                                  #}
{#   During fix mode (after review phase finds issues).                         #}
{#                                                                             #}
{# TRIGGER:                                                                    #}
{#   Pipeline runtime: fix phase when ISSUES.md exists.                         #}
{#                                                                             #}
{# VARIABLES:                                                                  #}
{#   PROMPT - Original user request from PROMPT.md (for context)                 #}
{#   PLAN   - Implementation plan from .agent/PLAN.md (for context)              #}
{#                                                                             #}
{# CONSTRAINTS:                                                                #}
{#   - Agent MUST ONLY work on files mentioned in ISSUES.md                      #}
{#   - Agent MUST NOT read other files or run commands                           #}
{#   - Agent MUST NOT modify ISSUES.md (orchestrator manages it)                  #}
{#   - Agent SHOULD modify source code files to fix issues                       #}
{#                                                                             #}
{# NOTES:                                                                      #}
{#   - ISSUES.md references are optional (isolation mode may remove it)          #}
{#   - Agent returns completion status as structured output                      #}
{# ============================================================================ #}

You are in FIX MODE. Address issues found during review.

{# ISSUES FROM REVIEW - Pre-loaded for you #}
{{ISSUES}}

{# ORIGINAL REQUEST - The user's original prompt for context #}
{{PROMPT}}

{# IMPLEMENTATION PLAN - The plan that was being implemented #}
{{PLAN}}

YOUR TASK:
1. Review the ISSUES content embedded above in this prompt
2. Fix the issues by modifying ONLY the files listed in "FILES YOU MAY MODIFY"
3. Verify your fixes work correctly

{# FILES TO MODIFY - Explicit list of files you may work on #}
{{FILES_TO_MODIFY}}

CRITICAL CONSTRAINTS:
- The ISSUES content is ALREADY PROVIDED above in this prompt - review it carefully
- You MUST ONLY modify files that are listed in the "FILES YOU MAY MODIFY" section
- You MAY read the files listed in "FILES YOU MAY MODIFY" to understand the code
- You MUST NOT read any other files in the repository
- You MUST NOT run commands to discover files or explore the codebase
- DO NOT run any commands including ls, find, git, cat, git grep, etc.
- The issues content is provided for reference - DO NOT try to read any ISSUES file
- Your work MUST be limited to fixing issues described in the embedded ISSUES content above

AFTER FIXING:
Return your completion status as structured output:
- "All issues addressed." (if you believe everything is fixed)
- "Issues remain." (if you believe issues still exist)
- "No issues found." (if the ISSUES content embedded above is empty)

DO NOT modify the ISSUES content - it is provided for reference only.
You SHOULD modify source code files to fix the issues.

GUIDELINES:
- Fix issues properly, don't just suppress warnings
- Ensure fixes don't introduce new issues
