- Fork the repository
- Clone your fork
- Create a virtual environment:
python -m venv .venv && source .venv/bin/activate - Install in development mode:
pip install -e ".[dev]" - Install pre-commit hooks:
pre-commit install
- Create a feature branch from
main - Make your changes
- Run linting:
ruff check src/ tests/ - Run type checks:
mypy src/ - Run tests:
pytest - Commit with clear messages (see commit conventions below)
- Open a PR against
main
Use conventional commits:
feat:— new featurefix:— bug fixdocs:— documentation onlytest:— adding/updating testsci:— CI/CD changeschore:— tooling, dependencies, scaffoldingrefactor:— code restructure without behavior change
Scope is optional but encouraged: feat(core):, fix(llm):, test(validator):
- LLM must never directly edit DXF text. Planner returns structured ops only.
- Protected layers are sacred. Never bypass the validator for protected layers.
- Save-as only. Never overwrite original DXF files.
- Local-first. No cloud dependencies for core functionality.
- Unit tests go in
tests/unit/ - Fixtures go in
tests/fixtures/ - Smoke tests go in
tests/smoke/ - All mock planner tests must work without an API key
- Python 3.11+
- Formatting/linting:
ruff - Type hints: use them, checked by
mypy - Pydantic v2 for all schemas