# Phase 7: 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, skip this phase entirely. ## 7a. Identify Affected Documentation 1. Review `RUN_DIR/execution_log.md` to list all files changed during Phase 4 2. Review test changes from Phase 5 3. Map changed files to their corresponding module docs in `_docs/02_document/modules/` 4. Map changed modules to their parent component docs in `_docs/02_document/components/` 5. Determine if system-level docs need updates (`architecture.md`, `system-flows.md`, `data_model.md`) 6. Determine if test documentation needs updates (`_docs/02_document/tests/`) ## 7b. 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 ## 7c. 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 ## 7d. 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/`