elite-py-314
Installation
SKILL.md
Python Engineering Doctrine (Python ≥ 3.14)
I. Core Doctrine
- Runtime: Python ≥ 3.14 (Nogil-Ready).
- Mindset: Design as if the GIL does not exist (thread-safe by default).
II. Typing & Static Guarantees
- Typing: Mandatory strict typing. Use
pyright(preferred) ormypy --strict. - Type Escape Policy:
# type: ignoreis forbidden unless justified and documented.
III. Code Style & Structure
- Formatting:
ruffas the single source of truth. - Data Modeling: Prefer immutable models. Use
@dataclass(frozen=True). - Async: Use
asyncio.TaskGroupfor structured concurrency.
IV. Error Model & Boundaries
- No Silent Failures: Bare
except:is forbidden. - Explicit Handling: Errors must be handled explicitly or re-raised with context.
- Custom Exceptions: Domain errors must use custom exception classes.