| name | tdd-dart-workflow |
| description | Rules, constraints, boundaries, and best practices for the multi-agent Python to Dart porting workflow. |
Python to Dart Porting Implementation Rules
These rules govern the development, design, and TDD workflow of porting a Python library to Dart. All agents running in this workspace must adhere strictly to these guidelines.
1. Multi-Agent TDD Workflow
Development proceeds in structured TDD cycles coordinated by the parent agent:
Phase 0: Discovery & Architecture Blueprinting
- Objective: The Architect maps Python paradigms to Dart and produces
<dart_package_dir>/specs/architecture_blueprint.md.
- Gate: The User must explicitly approve the blueprint before TDD cycles begin.
Phase 1: Design Specification
- Objective: The Architect writes a targeted spec sheet under
<dart_package_dir>/specs/ (e.g. <dart_package_dir>/specs/<module_name>_spec.md) describing the interfaces, types, behaviors, and expected test cases for a single module.
Phase 2: Write Failing Tests & Skeleton (Red Phase)
- Step 2a (Tester): Writes unit tests in
<dart_package_dir>/test/ based on the spec (compilation errors targeting missing classes are expected here).
- Rule (Test Fakes vs Stubs): Label fakes/mocks kept permanently inside the test file as
// TEST UTILITIES - KEEP PERMANENTLY. Label temporary stub classes that will be moved to lib/ as // SKELETON STUBS FOR COMPILATION - DELETE ONCE SKELETON IS IMPLEMENTED.
- Step 2b (Coder): Creates a skeleton (stub implementation) in
<dart_package_dir>/lib/src/ defining all required classes, constructors, methods, and properties, but returning dummy values or throwing .