# Step 2: Architecture Boundaries ## 담당 역할과 필수 스킬 - 담당 역할: `implementation-agent` - 필수 스킬: `harness`, `fesa-cpp-msvc-tdd` - 이 Step은 구현 전 architecture contract를 고정하는 documentation-only Step이다. ## 읽어야 할 파일 - `/AGENTS.md` - `/docs/CODINGSTYLE.md` - `/docs/PRD.md` - `/docs/ARCHITECTURE.md` - `/docs/ADR.md` - `/docs/superpowers/specs/2026-08-16-cpp-object-oriented-modular-refactoring-design.md` - `/docs/cpp-object-oriented-modular-refactoring/implementation-plan.md` - `/phases/cpp-object-oriented-modular-refactoring/index.json` - `/phases/cpp-object-oriented-modular-refactoring/step2.md` ## 작업 Requirements `R-MODEL-001`, `R-ELEMENT-001`, `R-PIPELINE-001`, `R-LOAD-001`, `R-BC-001`, `R-ANALYSIS-001`, `R-MODULE-001`의 ownership 방향을 문서화한다. 1. `/docs/ARCHITECTURE.md`에 다음 dependency/ownership graph를 반영한다. ```text Domain owns ElementDefinition / ElementProperty / Material / StepDefinition AnalysisModel is a non-owning stable-index view into Domain ElementFactory creates runtime Element candidates from compatible definitions DofManager -> ElementDofLayout SparseAssembler -> ElementStiffnessContribution ResultRecovery -> ElementResultBundle LoadAssembler -> ordered LoadContribution EssentialConstraintPolicy -> ConstraintDefinition Analysis <- LinearStaticAnalysis ``` 2. `/docs/ADR.md`에서 기존 ADR-007의 linear-static-specific protected hook contract를 최소 `Analysis::Run(const AnalysisRequest&)` base와 private `LinearStaticAnalysis` lifecycle 결정으로 대체하거나 supersede한다. 3. ADR에 `ElementDefinition`/runtime `Element` 분리, Domain `unique_ptr` ownership, no speculative material capability, load contribution/constraint policy 분리를 기록한다. 4. 기존 B33/MITC4 수치 및 HDF5/reference contract가 우선한다는 문구를 유지한다. 5. 문서에서 미래 MITC3/solid/dynamic/plastic 동작을 구현됐다고 표현하지 않는다. Documentation-only contract 고정이므로 artificial RED를 만들지 않는다. 구현 Step은 이 문서를 먼저 읽고 test-first로 진행한다. ## Acceptance Criteria ```powershell rg -n "ElementDefinition|ElementFactory|LoadContribution|ConstraintDefinition|Analysis::Run" ` docs/ARCHITECTURE.md docs/ADR.md rg -n "unique_ptr|stable-index|non-owning|LinearStaticAnalysis" ` docs/ARCHITECTURE.md docs/ADR.md git diff --check 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 ``` ## 검증 및 상태 갱신 - 문서 search evidence와 full regression 결과를 summary에 남긴다. - 승인 설계와 기존 ADR이 양립할 수 없으면 임의 결정하지 말고 `blocked`로 기록한다. - 성공 시 현재 Step만 `completed`로 갱신한다. - timestamp, retry, commit, advancement는 Executor 소유다. ## 금지사항 - C++ production, tests, CMake를 수정하지 마라. 이유: 이 Step은 architecture 기록만 소유한다. - 새로운 물리 기능 또는 입력/HDF5 계약을 ADR에 추가하지 마라. - 기존 formulation/reference 문서를 리팩터링에 맞춰 고치지 마라. - 직접 commit하거나 hook script를 수동 실행하지 마라.