---
type: always on
pattern: src/main/**/*.java
---

--

# General Code Review Guidelines

## Naming
- Use clear, descriptive names for variables, functions, and classes
- Avoid single-letter names except for loop indices
- Follow consistent naming conventions throughout the project

## Style
- Keep line length reasonable (e.g., 100–120 characters)
- Use consistent indentation and spacing
- Include comments for complex logic or important decisions

## Structure
- Keep functions short and focused on a single responsibility
- Avoid deep nesting and long parameter lists
- Group related code logically

## Best Practices
- Avoid duplicate code
- Prefer composition over inheritance
- Handle errors and edge cases gracefully

## Documentation
- Write doc comments for public functions and modules
- Keep documentation up to date with code changes

## Tools
- Follow project-specific tooling or linters
- Use version control best practices (e.g., atomic commits, meaningful messages)
