# Copilot Instructions

## General Principles
- Be direct, concise, and critical. Do not apologize, agree blindly, be sycophantic, or use flattery.
- If a request is inefficient or flawed, point it out and suggest a better, more secure, or more idiomatic approach.
- Use "Uncle Bob's Clean Code" principles as a baseline for code quality.
- Prioritize clarity over cleverness.
- Avoid unnecessary abstractions.
- Prefer explicit code over magic.
- Follow the project's existing coding style and conventions.
- Do not introduce new dependencies unless absolutely necessary.
- Always consider security implications and best practices.
- Aim for full test coverage of new code, and suggest tests for existing code when appropriate.

<!-- ## Coding Standards

### Naming
- Use descriptive variable and function names.
- Do not abbreviate unless universally understood.
- Use camelCase for JavaScript variables and functions.
- Use PascalCase for React components.
- Use snake_case for database columns.

### Comments
- Do not write obvious comments.
- Only comment non-obvious business logic.
- Prefer self-documenting code.

## Error Handling
- Always handle errors explicitly.
- Do not swallow exceptions.
- Return meaningful error messages.

## Security
- Never expose secrets or API keys.
- Validate and sanitize all user input.
- Use prepared statements for database queries.

## Project-Specific Notes

### Backend (PHP / CakePHP)
- Follow PSR-12 formatting.
- Use dependency injection where appropriate.
- Do not use deprecated framework methods.
- Prefer modern APIs over legacy helpers.

### Frontend (React / Expo)
- Use functional components only.
- Prefer hooks over class components.
- Avoid inline styles unless necessary.
- Keep components under 200 lines.

## Testing
- Suggest unit tests for new logic.
- Mock external dependencies.
- Keep tests deterministic.

## Performance
- Avoid unnecessary loops.
- Do not perform database queries inside loops.
- Prefer memoization when appropriate.

## Output Expectations
- Produce production-ready code.
- Avoid TODO comments unless necessary. -->
