mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 09:16:36 +00:00
142c6c4de8
- Replaced module-level path variables in constants.py with a structured Pydantic Config class. - Updated all relevant modules (train.py, augmentation.py, exports.py, dataset-visualiser.py, manual_run.py) to access paths through the new config structure. - Fixed bugs related to image processing and model saving. - Enhanced test infrastructure to accommodate the new configuration approach. This refactor improves code maintainability and clarity by centralizing configuration management.
1.5 KiB
1.5 KiB
Phase 4: Execution
Role: Software architect and developer Goal: Analyze coupling and execute decoupling changes Constraints: Small incremental changes; tests must stay green after every change
4a. Analyze Coupling
- Analyze coupling between components/modules
- Map dependencies (direct and transitive)
- Identify circular dependencies
- Form decoupling strategy
Write REFACTOR_DIR/coupling_analysis.md:
- Dependency graph (Mermaid)
- Coupling metrics per component
- Problem areas: components involved, coupling type, severity, impact
- Decoupling strategy: priority order, proposed interfaces/abstractions, effort estimates
BLOCKING: Present coupling analysis to user. Do NOT proceed until user confirms strategy.
4b. Execute Decoupling
For each change in the decoupling strategy:
- Implement the change
- Run blackbox tests
- Fix any failures
- Commit with descriptive message
Address code smells encountered: long methods, large classes, duplicate code, dead code, magic numbers.
Write REFACTOR_DIR/execution_log.md:
- Change description, files affected, test status per change
- Before/after metrics comparison against baseline
Self-verification:
- All tests still pass after execution
- No circular dependencies remain (or reduced per plan)
- Code smells addressed
- Metrics improved compared to baseline
Save action: Write execution artifacts
BLOCKING: Present execution summary to user. Do NOT proceed until user confirms.