driftflow docsdocs/ENGINEERING_PRINCIPLES.md
Engineering Principles
- Make invalid states unrepresentable. Use immutable validated domain
objects at component boundaries.
- Prefer polymorphism to conditionals. New models, schedules, controllers,
solvers, and decoders implement contracts rather than modifying the core loop.
- Fail loudly and locally. Raise typed exceptions at the boundary where a
bad value is introduced.
- Keep state ownership explicit. No hidden RNG state and no mutable global
extension registry.
- Use Google Python style. Public APIs have complete annotations and
Google-style docstrings. Lines are limited to 100 characters.
- Avoid semi-private APIs. Do not use underscore-prefixed members as a
convention. Public extension points are documented; implementation details
are isolated in private modules or concrete classes.
- Test behavior, not coverage numbers. Contract, property, numerical,
integration, and failure-path tests are required alongside coverage.
- Be honest about research status. Educational approximations and claims
of paper fidelity must be labeled clearly.