Writing scientific/research code at senior engineer level. Covers project structure, module organization, function design, type hints, naming, error handling, separation of concerns, idiomatic Python/NumPy/PyTorch patterns, defensive programming for scientific data, and the trade-offs between research-grade and production-grade code. Use when starting a new module, refactoring existing code, or learning the canonical patterns for medical imaging / ML / bioinformatics codebases.