@@ -165,6 +165,60 @@ Key environment variables for customization:
165165-  Example: "Initial commit: Advent of Code 2024 Rust workspace setup"
166166-  ** NEVER include co-authoring or Claude references in commit messages** 
167167
168+ ## Test Development Methodology  
169+ 
170+ ** Note** : Comprehensive test plan is located in ` notes/test_plan.md ` 
171+ 
172+ ### Test Development Order (Evidence-Based)  
173+ 
174+ Based on research from Google, Microsoft, and the Testing Pyramid, ALWAYS follow this development order:
175+ 
176+ 1 .  ** Unit Tests First**  (70-80% of total tests)
177+    -  Test individual functions in isolation
178+    -  Use mocks for external dependencies
179+    -  Focus on edge cases, error conditions, and happy paths
180+ 
181+ 2 .  ** Intra-module Integration Tests**  (after unit tests for each module)
182+    -  Test how functions within the same module work together
183+    -  Use realistic data where appropriate
184+    -  Test module-level workflows
185+ 
186+ 3 .  ** Inter-module Integration Tests**  (after dependent modules are unit tested)
187+    -  Test how different modules interact
188+    -  Test data flow between modules
189+    -  Test module boundary conditions
190+ 
191+ 4 .  ** System Integration Tests**  (after all module testing is complete)
192+    -  Test cross-system workflows
193+    -  Test system-wide error handling
194+    -  Test performance at system level
195+ 
196+ 5 .  ** End-to-End Tests Last**  (5-10% of total tests)
197+    -  Test complete user workflows
198+    -  Most expensive to maintain
199+    -  Use realistic audio and real models
200+ 
201+ ### Test Development Principles  
202+ 
203+ -  ** ALWAYS do in-depth analysis**  of each function before writing tests
204+ -  ** Bottom-up approach** : Test foundational modules first (dependencies)
205+ -  ** Module-by-module** : Complete all test types for a module before moving to next
206+ -  ** Conservative mocking** : Only mock external APIs, not internal logic
207+ -  ** Case-by-case decisions** : Audio and model mocking based on specific test needs
208+ -  ** Integration/E2E tests** : Use realistic audio and real models most of the time
209+ -  ** Avoid test duplication** : Always check existing codebase for similar tests before creating new ones
210+   -  Especially important for integration tests at different levels (intra-module, inter-module, system)
211+   -  Review existing test structure to avoid redundant coverage
212+   -  Ensure each test has a unique purpose and scope
213+ 
214+ ### Audio/ML Testing Strategy  
215+ 
216+ -  ** Unit tests** : Synthetic audio often acceptable (decide case-by-case)
217+ -  ** Integration tests** : Realistic audio preferred
218+ -  ** E2E tests** : Always use realistic audio and real models
219+ -  ** Performance tests** : Use realistic data for accurate measurements
220+ -  ** Training tests** : Use small but realistic datasets
221+ 
168222## Code Quality Enforcement  
169223
170224### Pre-commit Hooks (Active)  
0 commit comments