# r2x-pypsa Project Rules for AI Agents

## Project Context
- This is a library for converting PyPSA systems to R2X systems and exporting to Sienna format.


## Development Patterns
- All models use Pydantic with strict validation
- Loaders inherit from BaseLoader
- Results stored as intermediate files between phases
- Type hints required for all functions

## Package Management & Execution
- ALWAYS use `uv` for all Python-related tasks
- Run tests with: `uv run pytest`
- Run scripts with: `uv run python script.py`
- Install dependencies with: `uv add package_name`
- Use `uv run` prefix for all Python commands
- Never use `pip`, `python -m`, or direct `python` commands


## Common Tasks
- Testing: Use `uv run pytest` with example data in tests/data/

## Technologies
- Pydantic: Data validation and configuration
- PyPSA: Power system analysis
- Pandas: Data manipulation
- NumPy: Numerical computations
