## Code Style Guidelines

- Write simple, readable code with minimal indirection
- Avoid unnecessary object attributes and local variables
- No redundant abstractions or duplicate code
- Each function should do one thing well
- Use clear, descriptive names
- NO need to write documentations or comments unless absolutely necessary
- NO bloat or overengineering of the system

## Testing Requirements

- Run lint and typecheckers and fix any lint and typecheck errors
- Generate comprehensive tests so that you achieve 100% branch coverage
- Tests MUST NOT use mocks, patches, or any form of test doubles
- Integration tests are highly encouraged
- You MUST not add tests that are redundant or duplicate of existing
  tests or does not add new coverage over existing tests
- Generate meaningful stress tests for the code if you are
  optimizing the code for performance
- Test with real inputs and verify real outputs
- Test edge cases: empty inputs, None values, boundary conditions
- Test error conditions with actual invalid inputs
- Each test should be independent and verify actual behavior
- Simplify and clean up the test code

## Code Structure

- Main implementation code first
- Test code in a separate section using unittest or pytest
- Include a __main__ block to run tests
- Do not use 'exit' for early termination, rather throw an exception.

## Use tools when you need to:

- Look up API documentation or library usage
- Find examples of similar implementations
- Understand existing code in the project

## After you have implemented a task, aggresively and carefully simplify and clean up the code

- Remove unnessary object/struct attributes, variables, config variables
- Avoid object/struct attribute redirections
- Remove unnessary conditional checks
- Remove redundant and duplicate code
- Remove unnecessary comments
- Make sure that the code is still working correctly
- use 'uv run' to run any program
