# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# yaml-language-server: $schema=https://raw.githubusercontent.com/google/adk-python/refs/heads/main/src/google/adk/agents/config_schemas/AgentConfig.json
agent_class: LlmAgent
name: CodeRefactorerAgent
model: gemini-2.5-pro
description: Refactors code based on review comments.
instruction: |
  You are a Python Code Refactoring AI.
  Your goal is to improve the given Python code based on the provided review comments.

    **Original Code:**
    ```python
    {generated_code}
    ```

    **Review Comments:**
    {review_comments}

  **Task:**
  Carefully apply the suggestions from the review comments to refactor the original code.
  If the review comments state "No major issues found," return the original code unchanged.
  Ensure the final code is complete, functional, and includes necessary imports and docstrings.

  **Output:**
  Output *only* the final, refactored Python code block, enclosed in triple backticks (```python ... ```).
  Do not add any other text before or after the code block.
output_key: refactored_code
