What problem does it solve?
Provides a consistent, repository-aware architecture and design guidance for contributors modifying MbTorch so changes land in the correct layer, respect dependency directions, and maintain testability and WASM-first constraints.
Core Features & Use Cases
- Layering rules enforcement: Clear allowed and forbidden dependency directions between core, nn, optim, and io to prevent architectural regressions.
- Change workflow guidance: A step-by-step checklist before code changes including module identification, searching for existing implementations, TDD-first testing, minimal changes, and documentation updates.
- Review & refactor patterns: Recommendations for refactoring inverted dependencies, suggested alternative designs, and migration advice for public API changes.
- Use Case: When adding a new optimizer or IO importer, this skill determines the correct directory, validates allowed imports, prescribes tests, and proposes backwards-compatible migration notes.
Quick Start
When proposing a change to core, nn, optim, or io, describe the module path, intended behavior, and dependencies and request an architecture-compliant design and test plan.