docs: add modular refactoring implementation plan

This commit is contained in:
KOKO\Mimi
2026-08-16 02:49:35 +09:00
parent 1e5758f3e4
commit 2ab2e0c641
28 changed files with 2876 additions and 1 deletions
@@ -0,0 +1,74 @@
# Step 9: Result and I/O Vector3 Migration
## 담당 역할과 필수 스킬
- 담당 역할: `implementation-agent`
- 필수 스킬: `harness`, `fesa-cpp-msvc-tdd`
- 이 Step만 `RED -> observed failure -> minimal GREEN -> focused/full VERIFY`로 수행한다.
## 읽어야 할 파일
- `/AGENTS.md`
- `/docs/CODINGSTYLE.md`
- `/docs/ARCHITECTURE.md`
- `/docs/linear-static-3d-euler-beam/io.md`
- `/docs/linear-static-mitc4-shell/io.md`
- `/docs/cpp-object-oriented-modular-refactoring/implementation-plan.md`
- `/include/fesa/math/vector3.h`
- Step 8에서 migration한 element/model files
- `/include/fesa/results/result_recovery.h`, `/src/fesa/results/result_recovery.cpp`
- `/include/fesa/io/abaqus/domain_mapper.h`, `/src/fesa/io/abaqus/domain_mapper.cpp`
- `/include/fesa/io/hdf5/hdf5_results_writer.h`,
`/src/fesa/io/hdf5/hdf5_results_writer.cpp`
- matching result/I/O tests
- `/phases/cpp-object-oriented-modular-refactoring/index.json`
- `/phases/cpp-object-oriented-modular-refactoring/step9.md`
## 작업
Requirement `R-DUP-001`의 remaining production consumers를 구현한다.
1. ResultRecovery, DomainMapper, Hdf5ResultsWriter tests에 `C-DUP-002` characterization을
먼저 추가한다: global moment origin, shell frame/director serialization, finite rejection,
stable row/dataset identity and atomic replacement.
2. Tests가 new shared `Vector3` seam을 참조하도록 해 old local helper state에서 RED를 확인한다.
3. 세 production files의 repeated fixed-size add/subtract/scale/dot/cross/norm/finite helpers를
`Vector3` calls로 바꾸고 helper definitions를 제거한다.
4. HDF5 storage remains three scalar components in the exact existing dataset/schema; `Vector3`
must not become an HDF5 public or compound datatype.
5. Result location/sign, global-origin moment balance, source identity, mapper diagnostics와
floating-point accumulation order를 유지한다.
## Acceptance Criteria
```powershell
cmake --build .harness/build --config Debug --target fesa_unit_tests
ctest --test-dir .harness/build -C Debug `
-R "ResultRecovery|InpDomainMapping|Hdf5ResultsWriter" --output-on-failure
rg -n "(double|Vector3) (Dot|Cross|Norm|Add|Subtract|Scale)\(" `
src/fesa/results src/fesa/io
& "C:/Program Files/LLVM/bin/clang-format.exe" --dry-run --Werror `
src/fesa/results/result_recovery.cpp `
src/fesa/io/abaqus/domain_mapper.cpp `
src/fesa/io/hdf5/hdf5_results_writer.cpp
cmake --build .harness/build --config Debug
ctest --test-dir .harness/build -C Debug --show-only=json-v1
ctest --test-dir .harness/build -C Debug --output-on-failure
```
The duplicate scan must return no local primitive definitions. Existing HDF5 and reference
tests must pass without tolerance/schema edits.
## 검증 및 상태 갱신
- RED, focused suites, duplicate scan, full CTest를 summary에 기록한다.
- Schema, identity or numeric regression이면 `error`로 기록하고 artifacts를 수정하지 않는다.
- 성공 시 현재 Step만 `completed`로 갱신한다.
- timestamp, retry, commit, advancement는 Executor 소유다.
## 금지사항
- HDF5 schema 또는 stored component representation을 변경하지 마라.
- Result identity/location을 공통 Vector3 record로 합치지 마라.
- Mapper/recovery/writer file split을 수행하지 마라. 이유: Step 21–23 소유다.
- 직접 commit하거나 hook script를 수동 실행하지 마라.