mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-23 01:26:35 +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.8 KiB
1.8 KiB
Phase 1: Discovery
Role: Principal software architect Goal: Generate documentation from existing code and form solution description Constraints: Document what exists, not what should be. No code changes.
Skip condition (Targeted mode): If COMPONENTS_DIR and SOLUTION_DIR already contain documentation for the target area, skip to Phase 2. Ask user to confirm skip.
1a. Document Components
For each component in the codebase:
- Analyze project structure, directories, files
- Go file by file, analyze each method
- Analyze connections between components
Write per component to REFACTOR_DIR/discovery/components/[##]_[name].md:
- Purpose and architectural patterns
- Mermaid diagrams for logic flows
- API reference table (name, description, input, output)
- Implementation details: algorithmic complexity, state management, dependencies
- Caveats, edge cases, known limitations
1b. Synthesize Solution & Flows
- Review all generated component documentation
- Synthesize into a cohesive solution description
- Create flow diagrams showing component interactions
Write:
REFACTOR_DIR/discovery/solution.md— product description, component overview, interaction diagramREFACTOR_DIR/discovery/system_flows.md— Mermaid flowcharts per major use case
Also copy to project standard locations if in project mode:
SOLUTION_DIR/solution.mdDOCUMENT_DIR/system_flows.md
Self-verification:
- Every component in the codebase is documented
- Solution description covers all components
- Flow diagrams cover all major use cases
- Mermaid diagrams are syntactically correct
Save action: Write discovery artifacts
BLOCKING: Present discovery summary to user. Do NOT proceed until user confirms documentation accuracy.