# Step 5: MITC4 Physical Recovery

## 담당 역할과 필수 스킬

- 담당 역할: `implementation-agent`
- 필수 스킬: `harness`, `fesa-cpp-msvc-tdd`

## 읽어야 할 파일

- `/.agents/skills/harness/SKILL.md`, `/.codex/skills/fesa-cpp-msvc-tdd/SKILL.md`
- `/AGENTS.md`, `/docs/PRD.md`, `/docs/ARCHITECTURE.md`, `/docs/ADR.md`
- `/docs/HARNESS.md`, `/docs/HARNESS_WORKFLOW.md`, `/.codex/hooks.json`
- `/docs/linear-static-mitc4-shell/implementation-plan.md`
- `/docs/linear-static-mitc4-shell/requirements.md` Requirements 035/042-046/052/056
- `/docs/linear-static-mitc4-shell/research.md`
- `/docs/linear-static-mitc4-shell/formulation.md` Sections 14, 16
- `/docs/linear-static-mitc4-shell/numerical-review.md`
- `/docs/linear-static-mitc4-shell/io.md` result component/location order
- `/docs/linear-static-mitc4-shell/reference-model.md`
- phase indexes, `step5.md`, completed Steps 3-4 kernel/header/test and summaries

## 작업

1. `MITC4-KERNEL-007`과 `MITC4-PHYSREC-001`을 먼저 작성한다.
2. `Mitc4Shell` 내부에 global element displacement 24개를 받아 physical-only
   shell recovery를 반환하는 candidate seam을 최소 구현한다.
3. Fixed GP1..GP4에서 local frame, eight generalized strain/resultant를 계산하고
   BOTTOM/MIDDLE/TOP에서 direct `[S11,S22,S12]`를 계산한다.
4. Physical element strain energy만 반환하며 drilling stiffness/action은 모든
   physical recovery와 energy에서 제외한다.
5. Pure drill vector가 stabilized action은 가지지만 모든 physical recovery/energy가
   zero임을 검증한다.

## Acceptance Criteria

```powershell
$requiredBuildPaths=@("C:/git/googletest","C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl","C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb","C:/Program Files/HDF_Group/HDF5/2.1.1/cmake")
foreach($p in $requiredBuildPaths){if(-not(Test-Path -LiteralPath $p)){throw "Missing $p"}}
cmake --fresh -S . -B .harness/build -G "Visual Studio 18 2026" -A x64 `
  "-DFESA_GTEST_SOURCE_DIR=C:/git/googletest" `
  "-DMKL_DIR=C:/Program Files (x86)/Intel/oneAPI/mkl/2026.1/lib/cmake/mkl" `
  "-DTBB_DIR=C:/Program Files (x86)/Intel/oneAPI/tbb/2023.1/lib/cmake/tbb" `
  "-DHDF5_DIR=C:/Program Files/HDF_Group/HDF5/2.1.1/cmake"
cmake --build .harness/build --config Debug --target fesa_unit_tests
ctest --test-dir .harness/build -C Debug -R "Mitc4ShellDrilling|Mitc4ShellPhysicalRecovery" --output-on-failure
```

Expected missing recovery seam/pure-drill exclusion RED 후 minimal GREEN. 이후:

```powershell
cmake --build .harness/build --config Debug --target fesa_unit_tests
ctest --test-dir .harness/build -C Debug -R "Mitc4ShellDrilling|Mitc4ShellPhysicalRecovery|Mitc4ShellPatch" --output-on-failure
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
```

## 검증 및 상태 갱신

현재 Step만 status/summary payload를 갱신하고 RED/GREEN/VERIFY를 기록한다.

## 금지사항

- AnalysisState/global result rows, ResultRecovery orchestration, HDF5를 수정하지 마라.
- Drilling output/stress/resultant/energy를 추가하지 마라.
- Location averaging 또는 Abaqus integration-point identity를 만들지 마라.
- 직접 commit/hook 실행이나 reference/upstream 변경을 하지 마라.
