Python Development Standards
Before Writing Any Code
For applications and multi-file projects: Read references/tdd-workflow.md first. Follow TDD with mandatory verification after every change.
For CLI scripts and one-off utilities: Skip TDD workflow. Focus on working code.
Core Requirements
- •Type hints everywhere - all functions, all parameters, all return types. No
Any. - •Docstrings on all public interfaces - RST format for Sphinx compatibility
- •Absolute imports only - never use relative imports
- •Modern Python idioms - use latest features appropriate for target version
- •Empty
__init__.py- never add anything to__init__.py
Reference Files
Read based on task:
- •references/toolchain.md - Project setup and tool configuration (uv, ruff, mypy, pytest, nox, just)
- •references/cli-scripts.md - CLI tool development
- •references/documentation.md - Docstring and doctest patterns