# Step 3: Core IDs and Diagnostics ## 읽어야 할 파일 - `/AGENTS.md` - `/docs/PRD.md` - `/docs/ARCHITECTURE.md` - `/docs/ADR.md` - `/docs/superpowers/plans/2026-07-29-fesa-phase-1.md` - `/CMakeLists.txt` - `/tests/CMakeLists.txt` - `/include/fesa/core/version.hpp` - `/tests/unit/dependencies/dependency_smoke_test.cpp` ## 작업 외부 라이브러리에 의존하지 않는 `core` 값 타입을 TDD로 구현한다. - 생성 파일: `include/fesa/core/entity_id.hpp`, `vec3.hpp`, `source_location.hpp`, `diagnostic.hpp`, `status.hpp`와 대응 테스트 - 인터페이스: ```cpp template class EntityId final { public: explicit constexpr EntityId(std::int64_t value); [[nodiscard]] constexpr std::int64_t value() const noexcept; auto operator<=>(const EntityId&) const = default; }; struct Vec3 final { double x; double y; double z; }; struct SourceLocation final { std::filesystem::path file; std::size_t line; std::size_t column; }; enum class DiagnosticStage { io, syntax, semantic, model, equation, solver, results, validation }; enum class Severity { warning, error }; struct Diagnostic final { DiagnosticStage stage; Severity severity; std::string code; std::string message; std::optional source; }; ``` - typed ID의 잘못된 암시 변환, 음수 ID, nonfinite vector와 diagnostic source 보존을 실패 테스트로 먼저 고정한다. ## Acceptance Criteria ```powershell cmake --build --preset windows-debug ctest --preset windows-debug -R "Core|Diagnostic|EntityId" --output-on-failure ctest --preset windows-debug --output-on-failure ``` ## 검증 절차 1. production header 전에 실패하는 GoogleTest를 작성한다. 2. 최소 값 타입만 구현한다. 3. focused test와 전체 CTest를 실행한다. 4. `core`가 MKL, TBB, HDF5, Abaqus header를 include하지 않는지 확인한다. 5. index와 summary를 갱신한다. ## 금지사항 - 단위 변환 시스템을 만들지 마라. 이유: FESA는 일관 단위계만 사용한다. - 범용 reflection이나 serialization을 만들지 마라. 이유: 요구되지 않았다. - equation ID를 정의하지 마라. 이유: `DofManager` 단계의 책임이다.