Build pyCellModeller as a truthful, incremental Torch-first rewrite with deterministic CPU behavior as the bootstrap reference.
- The implemented API is currently minimal:
Simulation,SimulationConfig,SimulationState. - The implemented engine is
TorchEnginewith deterministic toy stepping. mechanics,fields,biology,io, andcliare scaffolded namespaces and mostly placeholders.- PyOpenCL is intentionally not part of the rewrite path; v1 is Torch-only.
- planning and tradeoff decisions
- architecture-level guardrails
- milestone sequencing
- ADR change decisions
- code and test changes
- doc updates tied to implementation
- keeping docs synchronized with current scaffold
- surfacing blockers and scope drift quickly
- Keep docs aligned with what is implemented today (not aspirational state).
- Prefer small incremental changes with passing tests.
- Treat CPU deterministic behavior as the reference path.
- Keep Torch-specific execution details inside
engine. - Do not reintroduce PyOpenCL compatibility work in v1.
- Do not list folders/modules in docs that do not exist in the repo.
- Extend
SimulationConfig/SimulationStatevalidations - Add deterministic toy-engine behavior and tests
- Add incremental API methods consistent with current architecture
- Fill in scaffolded modules one layer at a time
- Update README/architecture/product docs after each API change
- Public API breaking changes
- Module boundary restructures
- Introduction of alternative execution backends
- Major data model changes that invalidate existing tests
- Large persistence format decisions
For behavior changes:
- unit tests for config/state invariants
- integration tests for simulation lifecycle methods
- regression tests for deterministic stepping values
Run CPU path first. CUDA checks are optional at this stage unless explicitly requested.
Create/update ADRs when:
- engine design changes beyond deterministic toy stepping
- backend strategy changes from Torch-only v1
- state model introduces major new persistent structures
- Keep this repository as a clean rewrite, not a PyOpenCL port.
- Keep bootstrap scope narrow and truthful.
- Prefer clarity and determinism over premature optimization.
- Do not introduce CL/OpenCL names in public APIs.
- Do not add compatibility shims unless explicitly requested by maintainers.
- Preserve Torch-native naming and architecture decisions across docs and code.