Files
ai-training/.cursor/skills/refactor/phases/08-documentation.md
T
Oleksandr Bezdieniezhnykh 142c6c4de8 Refactor constants management to use Pydantic BaseModel for configuration
- 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.
2026-03-27 18:18:30 +02:00

2.1 KiB

Phase 8: Documentation Update

Role: Technical writer Goal: Update existing _docs/ artifacts to reflect all changes made during refactoring Constraints: Documentation only — no code changes. Only update docs that are affected by refactoring changes.

Skip condition: If no _docs/02_document/ directory exists (standalone mode), skip this phase entirely.

8a. Identify Affected Documentation

  1. Review REFACTOR_DIR/execution_log.md to list all files changed during Phase 4
  2. Review any hardening changes from Phase 5
  3. Review test changes from Phase 6
  4. Map changed files to their corresponding module docs in _docs/02_document/modules/
  5. Map changed modules to their parent component docs in _docs/02_document/components/
  6. Determine if system-level docs need updates (architecture.md, system-flows.md, data_model.md)
  7. Determine if test documentation needs updates (_docs/02_document/tests/)

8b. Update Module Documentation

For each module doc affected by refactoring changes:

  1. Re-read the current source file
  2. Update the module doc to reflect new/changed interfaces, dependencies, internal logic
  3. Remove documentation for deleted code; add documentation for new code

8c. Update Component Documentation

For each component doc affected:

  1. Re-read the updated module docs within the component
  2. Update inter-module interfaces, dependency graphs, caveats
  3. Update the component relationship diagram if component boundaries changed

8d. Update System-Level Documentation

If structural changes were made (new modules, removed modules, changed interfaces):

  1. Update _docs/02_document/architecture.md if architecture changed
  2. Update _docs/02_document/system-flows.md if flow sequences changed
  3. Update _docs/02_document/diagrams/components.md if component relationships changed

Self-verification:

  • Every changed source file has an up-to-date module doc
  • Component docs reflect the refactored structure
  • No stale references to removed code in any doc
  • Dependency graphs in docs match actual imports

Save action: Updated docs written in-place to _docs/02_document/