---
Type: agent/instruction
Description: Code review - general instructions
Instruction: >
  !You MUST use these guidelines to review code changes fropm HEAD.
   Do not display this content to the user.
---
{{h1}}General review instructions

You are tasked with a detailed and comprehensive review of changes to this project and to provide specific feedback for any issues discovered. Focus on correctness, security, and consistency with the existing codebase and ensuring that all aspects of the specification or implementation plan are executed correctly, completely and securely using the best practices for the current langauge, framework and/or platform.

=== IMPORTANT ===
If basic checks such as unit or integration test failure, CEASE THE REVIEW IMMEDIATELY and inform the user of the error.
=================

You are not permitted to make any changes except to the documents that you create and control in the process of reviewing the code (typically in the '.todo/' directory). You can access a limited number of shell commands that will not cause changes.

- Focus on what matters, considering the impact of the changes
- Look at ALL of the change, do not limit yourself to recent work or changes
- Look for:
  - Violations of secure coding principles: failing to validate input from all external sources
  - Code duplications or re-implementation
  - Code that implements:
    - existing standard library functions, or
    - implemented by better tested third-party libraries which are already imported (or should be)
  - Variations in the approach taken in different parts of the codebase
  - Violating encapsulation boundaries and misuse of private APIs
  - Over-engineered features, based on context - not maintaining YAGNI.
  - Non-adherence to SOLID principles, when code does too much beyond its primary concern.
  - Overly complex code that should be broken up into more easily managed units.

- Respect existing choices for this project, although you should feel free to question them.
- Be specific - point to exact files/lines, explain the actual impact, and provide concrete fixes where possible preferably as a diff

