docs: plan MITC4 mass and FEAST implementation

This commit is contained in:
KOKO\Mimi
2026-09-06 05:37:30 +09:00
parent 1d4f5ac44a
commit d533b61541
20 changed files with 2280 additions and 6 deletions
+9 -1
View File
@@ -23,6 +23,14 @@
"dir": "shell-surface-pressure-load",
"status": "completed",
"completed_at": "2026-09-01T17:43:57+0900"
},
{
"dir": "mitc4-shell-feast-eigen-execution-prep",
"status": "pending"
},
{
"dir": "mitc4-shell-feast-eigen",
"status": "pending"
}
]
}
}
@@ -0,0 +1,22 @@
{
"project": "FESA Structural Solver",
"phase": "mitc4-shell-feast-eigen-execution-prep",
"steps": [
{
"step": 0,
"name": "bounded-execution-deadlines",
"status": "pending",
"owned_paths": [
"scripts/execute.py",
".codex/hooks.json",
"scripts/hooks/stop_validation.py",
"scripts/msvc_harness/models.py",
"scripts/msvc_harness/process.py",
"tests/test_execute.py",
"tests/test_harness_timeouts.py",
"docs/HARNESS_WORKFLOW.md",
"docs/mitc4-shell-feast-eigen/implementation-prep-evidence.md"
]
}
]
}
@@ -0,0 +1,142 @@
# Step 0: 유한 실행시간 조정과 정상 검증 경로 보존
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen-execution-prep`
- Requirement: `FEM-REQ-MITC4-EIGEN-023/025`; `MFE-C27`, `IO-T11`
- 이 Step은 운영준비이고 solver physics/C++ 기능 변경이 아니다.
## 필수 입력
Feature 폴더 `docs/mitc4-shell-feast-eigen/`와 다음 management/approved bundle을 읽는다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
추가 필수: [현재 Executor](../../scripts/execute.py), [등록 hooks](../../.codex/hooks.json),
[Stop](../../scripts/hooks/stop_validation.py), [CommandSpec](../../scripts/msvc_harness/models.py),
[process](../../scripts/msvc_harness/process.py), [config](../../scripts/msvc_harness/config.py),
[CMake adapter](../../scripts/msvc_harness/adapters/cmake.py), [HARNESS](../../docs/HARNESS.md),
[WORKFLOW](../../docs/HARNESS_WORKFLOW.md), [환경·activation 상세](../../docs/mitc4-shell-feast-eigen/implementation-environment.md).
현재 config schema에는 timeout option이 없다. 이번에 새 config field를 만들지 않는다.
## Owned paths
```json
[
"scripts/execute.py",
".codex/hooks.json",
"scripts/hooks/stop_validation.py",
"scripts/msvc_harness/models.py",
"scripts/msvc_harness/process.py",
"tests/test_execute.py",
"tests/test_harness_timeouts.py",
"docs/HARNESS_WORKFLOW.md",
"docs/mitc4-shell-feast-eigen/implementation-prep-evidence.md"
]
```
타 owner 변경을 보존한다. `docs/HARNESS_WORKFLOW.md`는 실제 deadline 값의 설명 문단만 수정하고 workflow/approval/Git/Hook 계약을 바꾸지 않는다.
## RED
먼저 `tests/test_harness_timeouts.py`를 작성한다. 실제 hook를 수동 실행하지 않고 기존 Python tests 방식으로 clock/subprocess/adapter를 주입한다.
1. `StepExecutor._invoke_codex`가 기본14400초를 전달함과 실제 TimeoutExpired가 terminal result 없을 때만 최대2번 재시도되는 것을 검사한다. 기존 `tests/test_execute.py`의1800 message 기대값은 승인 default14400으로 갱신하되 explicit injected1800 exception의 actual timeout message는 그대로 구분한다.
2. `stop_validation.run_validations`에서 새 shared deadline7200이 discovery/toolchain/execute_plan까지 같은 deadline으로 전달되는지 검사한다. Hook entry/reentry/doc-only 정책은 기존 tests로 보존한다.
3. `CommandSpec` default7200 및 `execute_plan` 자체 default7200을 검사한다. Fake elapsed2000 뒤 다음 command cap이 remaining5200이고 explicit cap5이면5를 유지하는지, deadline 만료·nonzero subprocess가 계속 failure인지 확인한다. 실제 대기는 하지 않는다.
4. 등록 Stop timeout7500이 shared7200보다 크며 command/matcher/PreToolUse timeout30이 그대로인지 검사한다. Executor14400>registered7500 관계와 finite positive 값을 확인한다.
5. One-time module invocation은 딱 `StepExecutor.CODEX_TIMEOUT_SECONDS`만 유한14400으로 지정하고 unchanged `execute.main()`을 호출한다는 계약을 mock entry로 검사한다. Sandbox modes/default, MAX_TRANSPORT_ATTEMPTS, ownership/preflight/branch/commit/terminal result는 기존 tests를 유지한다.
```powershell
uv run --with pytest python -B -m pytest -v -rs tests/test_harness_timeouts.py
```
Actual nonzero exit와 기존1800 기본값 때문에 실패한 assertions를 기록한다. Import/setup/인증 오류는 RED가 아니다.
## Minimal GREEN
변경은 아래 다섯 runtime 설정의 literal default와 필요한 설명에 한정한다.
| 파일 / symbol | 기존 | 새 값 |
| --- | ---: | ---: |
| scripts/execute.py / StepExecutor.CODEX_TIMEOUT_SECONDS | 1800 | 14400 |
| .codex/hooks.json / Stop command timeout | 1800 | 7500 |
| scripts/hooks/stop_validation.py / TOTAL_TIMEOUT_SECONDS | 1800 | 7200 |
| scripts/msvc_harness/models.py / CommandSpec.timeout_seconds | 1800 | 7200 |
| scripts/msvc_harness/process.py / execute_plan total_timeout_seconds default | 1800 | 7200 |
`min(command cap, shared remaining)` 알고리즘은 그대로 둔다. 다른 함수·sandbox·transport/Coordinator retry·Hook scope/active flags·ownership/Git/API를 변경하지 않는다. `docs/HARNESS_WORKFLOW.md`의 이전1800 설명은 위 유한 deadline/새 process activation을 정확히 반영한다. Config field/환경변수/새 public CLI timeout option은 만들지 않는다.
## Focused VERIFY
```powershell
uv run --with pytest python -B -m pytest -v -rs tests/test_harness_timeouts.py tests/test_execute.py tests/test_execute_ownership.py tests/test_hook_validation_scope.py tests/test_harness_preset_contract.py
```
Exit0, failures0, 현재 sandbox/terminal/ownership regressions 보존을 확인한다. PreToolUse/Stop unit tests는 mock 테스트이고 실제 등록 Stop 통과 evidence가 아니다.
## Full VERIFY
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
C++는 수정하지 않는다. 기존 same-binary cache를 쓰는 helper와 항상 fresh solver를 호출하는 nonlinear helper를 구별한다. 모든 full CTest를 실제 실행하고 완결 count/exit/duration을 기록한다. Cached outputs를 이번 eigen 신규 검증이라고 부르지 않는다. 등록 Stop도 정상 수행하며 full VERIFY를 생략/분할 성공으로 대체하지 않는다.
현재 prep Executor와 Codex의 activation 경계는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)대로다. 이미 실행 중인 Executor timeout self-edit는 활성화되지 않으며 launch-time Stop outer1800이 유지될 수 있다. 성공을 가정하지 말고 actual registered Stop·Codex exit0을 gate로 확인한다. 등록 Stop 초과/실패 시 정상 terminal evidence와 원시 로그를 보존해 Coordinator에 반환한다. Hook 직접 실행, 재진입 flag/state 조작, 거짓 Markdown-only skip으로 우회하지 않는다.
## Evidence / result
`docs/mitc4-shell-feast-eigen/implementation-prep-evidence.md`에 feature/owner/r2, 각 RED/GREEN command/exit/duration, 전체 pytest/CTest counts, cap before/after, 실제 code diff 범위, current loaded wrapper14400과 등록 Stop launch1800 가능성, 그 시점에 관찰된 Stop/Codex exit 또는 아직 확인 대기인 항목을 기록한다. Raw logs는 ignored `.harness/build/mitc4-eigen-evidence/prep/`다. CTest log는 즉시 복사 보존한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
이 Step의 manual AC가 통과하면 현재 phase index Step0의 `completed/summary`만 기록한다. 실패는 `error/error_message` 또는 `blocked/blocked_reason`이며 attempt_history/timestamps/다른Step/top index는 건드리지 않는다. 최종 phase commit/branch/checkpoint는 Executor가 수행한다. 마지막 응답은 common envelope다. Main invocation은 prep Executor의 실제 종료·completed·registered Stop 성공·actual Codex exit0·code/control commit·clean 및 Coordinator 사후 감사 완료 후 Coordinator가 새 process로 시작한다.
+181
View File
@@ -0,0 +1,181 @@
{
"project": "FESA Structural Solver",
"phase": "mitc4-shell-feast-eigen",
"steps": [
{
"step": 0,
"name": "frequency-model-and-input",
"status": "pending",
"owned_paths": [
"include/fesa/model/model_types.h",
"include/fesa/model/frequency_step.h",
"src/fesa/model/frequency_step.cpp",
"include/fesa/model/domain.h",
"src/fesa/model/domain.cpp",
"include/fesa/analysis/analysis_model.h",
"src/fesa/analysis/analysis_model.cpp",
"src/fesa/fem/dof_manager.cpp",
"tests/unit/model/model_types_test.cpp",
"tests/unit/model/frequency_step_test.cpp",
"tests/unit/model/domain_test.cpp",
"tests/unit/analysis/analysis_model_test.cpp",
"tests/unit/fem/dof_manager_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/io/abaqus/input_syntax.h",
"src/fesa/io/abaqus/input_reader.cpp",
"src/fesa/io/abaqus/domain_mapping_context.h",
"src/fesa/io/abaqus/domain_mapping_context.cpp",
"tests/unit/io/abaqus/input_syntax_test.cpp",
"tests/unit/io/abaqus/input_reader_test.cpp",
"tests/unit/io/abaqus/domain_mapping_context_test.cpp",
"tests/unit/io/abaqus/frequency_domain_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step0-evidence.md"
]
},
{
"step": 1,
"name": "covariant-drilling-stabilization",
"status": "pending",
"owned_paths": [
"src/fesa/elements/mitc4_drilling_scale.h",
"src/fesa/elements/mitc4_drilling_scale.cpp",
"src/fesa/elements/mitc4_shell.cpp",
"tests/unit/elements/mitc4_drilling_scale_test.cpp",
"tests/unit/elements/mitc4_shell_test.cpp",
"tests/unit/elements/nonlinear_mitc4_shell_test.cpp",
"tests/unit/elements/nonlinear_mitc4_shell_tangent_test.cpp",
"tests/integration/analysis/mitc4_covariance_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"docs/mitc4-shell-feast-eigen/implementation-step1-evidence.md"
]
},
{
"step": 2,
"name": "consistent-and-lumped-mass",
"status": "pending",
"owned_paths": [
"include/fesa/elements/mitc4_shell.h",
"src/fesa/elements/mitc4_shell_mass.cpp",
"tests/unit/elements/mitc4_shell_test.cpp",
"tests/unit/elements/mitc4_shell_mass_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/elements/element_factory.h",
"src/fesa/elements/element_factory.cpp",
"include/fesa/assembly/shell_mass_assembler.h",
"src/fesa/assembly/shell_mass_assembler.cpp",
"tests/unit/elements/element_factory_test.cpp",
"tests/unit/assembly/shell_mass_assembler_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step2-evidence.md"
]
},
{
"step": 3,
"name": "constrained-mass-reduction",
"status": "pending",
"owned_paths": [
"include/fesa/fem/dof_manager.h",
"src/fesa/fem/dof_manager.cpp",
"src/fesa/analysis/eigen_reduction.h",
"src/fesa/analysis/eigen_reduction.cpp",
"tests/unit/fem/dof_manager_test.cpp",
"tests/unit/analysis/eigen_reduction_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"docs/mitc4-shell-feast-eigen/implementation-step3-evidence.md"
]
},
{
"step": 4,
"name": "feast-lowest-mode-solver",
"status": "pending",
"owned_paths": [
"src/fesa/solvers/eigen/feast_backend.h",
"src/fesa/solvers/eigen/feast_backend.cpp",
"src/fesa/solvers/eigen/feast_initial_space.h",
"src/fesa/solvers/eigen/feast_initial_space.cpp",
"tests/unit/solvers/eigen/feast_backend_test.cpp",
"tests/unit/solvers/eigen/feast_initial_space_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/solvers/eigen/eigen_solver.h",
"include/fesa/solvers/eigen/mkl_feast_eigen_solver.h",
"src/fesa/solvers/eigen/mkl_feast_eigen_solver.cpp",
"src/fesa/solvers/eigen/feast_search.h",
"src/fesa/solvers/eigen/feast_search.cpp",
"tests/unit/solvers/eigen/eigen_solver_test.cpp",
"tests/unit/solvers/eigen/mkl_feast_eigen_solver_test.cpp",
"tests/unit/solvers/eigen/feast_search_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step4-evidence.md"
]
},
{
"step": 5,
"name": "validated-frequency-procedure",
"status": "pending",
"owned_paths": [
"include/fesa/analysis/eigen_analysis_state.h",
"src/fesa/analysis/eigen_analysis_state.cpp",
"src/fesa/analysis/eigen_validation.h",
"src/fesa/analysis/eigen_validation.cpp",
"tests/unit/analysis/eigen_analysis_state_test.cpp",
"tests/unit/analysis/eigen_validation_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/analysis/linear_frequency_procedure.h",
"src/fesa/analysis/linear_frequency_procedure.cpp",
"tests/integration/analysis/linear_frequency_procedure_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step5-evidence.md"
]
},
{
"step": 6,
"name": "eigen-output-transaction",
"status": "pending",
"owned_paths": [
"include/fesa/results/eigen_results_writer.h",
"include/fesa/io/hdf5/eigen_hdf5_results_writer.h",
"src/fesa/io/hdf5/eigen_hdf5_results_writer.cpp",
"src/fesa/io/hdf5/eigen_hdf5_schema.h",
"src/fesa/io/hdf5/eigen_hdf5_schema.cpp",
"src/fesa/io/hdf5/hdf5_model_writer.h",
"src/fesa/io/hdf5/hdf5_model_writer.cpp",
"tests/unit/results/eigen_results_writer_test.cpp",
"tests/unit/io/hdf5/eigen_hdf5_results_writer_test.cpp",
"tests/unit/io/hdf5/eigen_hdf5_schema_test.cpp",
"tests/unit/io/hdf5/hdf5_model_writer_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/analysis/prepared_analysis.h",
"src/fesa/analysis/prepared_analysis.cpp",
"src/fesa/app/fesa_application.cpp",
"tests/unit/analysis/prepared_analysis_test.cpp",
"tests/integration/app/fesa_application_test.cpp",
"tests/integration/app/frequency_application_test.cpp",
"tests/integration/analysis/linear_frequency_procedure_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step6-evidence.md"
]
},
{
"step": 7,
"name": "fresh-reference-and-evidence",
"status": "pending",
"owned_paths": [
"tests/reference/eigen_reference_comparison.h",
"tests/reference/eigen_reference_comparison.cpp",
"tests/reference/eigen_reference_comparison_test.cpp",
"tests/CMakeLists.txt",
"tests/reference/eigen_reference_cases_test.cpp",
"tests/reference/mitc4_eigen_static_regression_test.cpp",
"tests/integration/analysis/linear_frequency_procedure_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-report.md",
"docs/mitc4-shell-feast-eigen/build-test.md",
"docs/mitc4-shell-feast-eigen/reference-comparison.md",
"docs/mitc4-shell-feast-eigen/reference-comparison-detail.md",
"docs/mitc4-shell-feast-eigen/implementation-step7-evidence.md"
]
}
]
}
+169
View File
@@ -0,0 +1,169 @@
# Step 0: Frequency semantic model과 exact 입력 subset
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: execution-prep의 실제 completed·registered Stop 성공 및 새 main invocation
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-001`, `FEM-REQ-MITC4-EIGEN-002`, `FEM-REQ-MITC4-EIGEN-003`, `FEM-REQ-MITC4-EIGEN-004`, `FEM-REQ-MITC4-EIGEN-007`, `FEM-REQ-MITC4-EIGEN-009`, `FEM-REQ-MITC4-EIGEN-015`, `FEM-REQ-MITC4-EIGEN-016`, `FEM-REQ-MITC4-EIGEN-018`, `FEM-REQ-MITC4-EIGEN-024`
- Logical cases: `MFE-C06`, `MFE-C07`, `MFE-C13`, `MFE-C23`, `MFE-C26`
- I/O obligations: `IO-T01`, `IO-T02`, `IO-T03`, `IO-T04`, `IO-T10`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [io-input.md#i3-density-material-mapping](../../docs/mitc4-shell-feast-eigen/io-input.md#i3-density-material-mapping), [io-mapping.md#m1-input에서-equationresult까지](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m1-input에서-equationresult까지), [formulation-eigen.md#e1-조립-단위-scaling과-실제-global-제약](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e1-조립-단위-scaling과-실제-global-제약), [io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md), [io-schema.md#o2-metadata-모델과-source-요청](../../docs/mitc4-shell-feast-eigen/io-schema.md#o2-metadata-모델과-source-요청), [io-mapping.md#m5-구현test-obligations와-requirement-연결](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m5-구현test-obligations와-requirement-연결).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"include/fesa/model/model_types.h",
"include/fesa/model/frequency_step.h",
"src/fesa/model/frequency_step.cpp",
"include/fesa/model/domain.h",
"src/fesa/model/domain.cpp",
"include/fesa/analysis/analysis_model.h",
"src/fesa/analysis/analysis_model.cpp",
"src/fesa/fem/dof_manager.cpp",
"tests/unit/model/model_types_test.cpp",
"tests/unit/model/frequency_step_test.cpp",
"tests/unit/model/domain_test.cpp",
"tests/unit/analysis/analysis_model_test.cpp",
"tests/unit/fem/dof_manager_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/io/abaqus/input_syntax.h",
"src/fesa/io/abaqus/input_reader.cpp",
"src/fesa/io/abaqus/domain_mapping_context.h",
"src/fesa/io/abaqus/domain_mapping_context.cpp",
"tests/unit/io/abaqus/input_syntax_test.cpp",
"tests/unit/io/abaqus/input_reader_test.cpp",
"tests/unit/io/abaqus/domain_mapping_context_test.cpp",
"tests/unit/io/abaqus/frequency_domain_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step0-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. Density 정의, frequency step과 non-owning 실행 view
Symbols: `DensityDefinition, FrequencyStepDefinition, FrequencyStep; Domain::FrequencySteps/Densities; AnalysisModel::IsFrequency/GetFrequencyStep/BoundaryConditions/StepLocation; DofManager::Build/Create`.
**RED:** ModelTypes/Domain/AnalysisModel/DofManager tests에 두 material의 서로 다른 rho·t와 frequency-only ModelDefinition을 만든다. FrequencyStep에 요청 N/source options/BC를 보존하고 view의 주소가 Domain storage와 같은지 검사한다. 현재 타입/API 부재의 compile failure 또는 exactly-one-static-step 거부를 관찰한다. Missing/zero/negative/nonfinite active density, multiple/static+frequency step, ambiguous source BC를 각각 거부하고 기존 density 없는 static fixture는 유지한다.
**Minimal GREEN:** Density는 material identity에 연결된 Domain-owned composition record로 저장한다. Material base에 가짜 기본 density/no-op capability를 추가하지 않는다. 기존 StaticStepDefinition/StepDefinition API를 유지하면서 별도 FrequencyStep을 소유한다. AnalysisModel은 sole active procedure에 대한 boundary/location view를 제공하고 DofManager의 Step() 직접 접근만 해당 공통 view로 바꾼다. Static legacy constructors/loads/0x0 Kff 의미는 유지한다. Parser·solver·writer는 다음 단계이며 아직 CLI frequency 지원을 주장하지 않는다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
### 2. Density/FREQUENCY exact parser와 원문 보존
Symbols: `DataLine::original_line; AbaqusInputReader::Read; DomainMappingContext::Impl/ParseSyntax/FinalizeMaterialProperties/FinalizeStep/Commit`.
**RED:** 기존 InputSyntax/InputReader에 spaces·빈 slot·CRLF를 포함한 원 data line 보존 기대값을 먼저 추가한다. FrequencyDomain tests는 원본 input 그대로 729/676/104 nodes/elements/boundary, Step-2/N10, rho2700/t0.5와 exact warnings/source records를 검사하여 현재 FREQUENCY/DENSITY 거부를 관찰한다. 테스트 fixture 안에서만 S4R 변경, density/step/option/field/BC/no-op scope별 양성·음성 입력을 만든다.
**Minimal GREEN:** I1~I6의 exact allowlist를 기존 private context의 parse/finalize 책임에 통합한다. 물리 data line 원문을 보존하고 numeric label/lexical identity는 재사용한다. Density의 rho 또는 rho, 한 row만 허용; N은 1~7 fields 첫 양의 checked int64, 나머지 blank. Explicit SIM/acoustic와 source Lanczos의 stable warning을 보존한다. Active density 검사와 source location/category를 연결한다. Static Density subset은 확대하지 않는다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(ModelTypes|FrequencyStep|Domain|AnalysisModel|DofManager|InputSyntax|InputReader|DomainMappingContext|FrequencyDomain|DomainMapper|ShellSurfacePressureDomain)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(ModelTypes|FrequencyStep|Domain|AnalysisModel|DofManager|InputSyntax|InputReader|DomainMappingContext|FrequencyDomain|DomainMapper|ShellSurfacePressureDomain)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `FrequencyStep.MfeC23SemanticOwnership`
- `FrequencyDomain.MfeC07DensityFailures`
- `FrequencyDomain.MfeC23ExactReferenceSubset`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 0에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-step0-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step0/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 0만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step0-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
+147
View File
@@ -0,0 +1,147 @@
# Step 1: 공변 drilling scale과 정적 회귀
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: 동일 phase의 Step 0 completed
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-002`, `FEM-REQ-MITC4-EIGEN-014`, `FEM-REQ-MITC4-EIGEN-023`, `FEM-REQ-MITC4-EIGEN-024`, `FEM-REQ-MITC4-EIGEN-027`
- Logical cases: `MFE-C08`, `MFE-C09`, `MFE-C10`, `MFE-C11`, `MFE-C12`, `MFE-C26`
- I/O obligations: `IO-T10`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md), [numerical-review-evidence.md#nr-mfe-001-직접-계산-반례](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md#nr-mfe-001-직접-계산-반례), [numerical-review-controls.md#c7-승인된-정적-회귀-기준](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md#c7-승인된-정적-회귀-기준).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"src/fesa/elements/mitc4_drilling_scale.h",
"src/fesa/elements/mitc4_drilling_scale.cpp",
"src/fesa/elements/mitc4_shell.cpp",
"tests/unit/elements/mitc4_drilling_scale_test.cpp",
"tests/unit/elements/mitc4_shell_test.cpp",
"tests/unit/elements/nonlinear_mitc4_shell_test.cpp",
"tests/unit/elements/nonlinear_mitc4_shell_tangent_test.cpp",
"tests/integration/analysis/mitc4_covariance_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"docs/mitc4-shell-feast-eigen/implementation-step1-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. 공변적인 초기 rotary trace scale과 기존 정적 회귀
Symbols: `mitc4_internal::ComputeDrillingScale; Mitc4Shell::Stiffness; existing NonlinearMitc4Shell::Create/Evaluate`.
**RED:** NR-MFE-001 원 rectangle와 Z45 회전에서 complete K를 각각 재계산해 kd=19/4800, Kff=10369/7500, static thetaZ=7500/10369 및 full reaction covariance를 기대한다. 현재 min(R+)는 실패해야 한다. Inventory [0,0,2,4,0,6,0,4]→kref2, allzero/negative/NaN/Inf/DBL_MAX/subnormal cases를 별도 test로 고정한다. C12에서는 기존 nonlinear gamma의 directional schedule/objectivity와 초기 kd 고정을 검사한다.
**Minimal GREEN:** S1/S2의 여덟 rotary 대각 전체를 fixed order로 scaled mean하고 1e-3을 곱하는 private helper를 도입하여 기존 min 계산만 교체한다. 기존 test의 old min/old kd literal 기대 부분만 승인된 trace oracle로 바꾼다. Physical K, Tphys/Tdrill, geometry, recovery는 변경하지 않는다. Nonlinear source는 이미 초기 linear kd를 저장하므로 read-only 재사용하고 tests로 frozen lifecycle과 derivatives를 확인한다. Physical admissible moment m=(5/3)b를 사용한다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(Mitc4DrillingScale|Mitc4Shell[^.]*|Mitc4Covariance|NonlinearMitc4[^.]*|NonlinearStaticProcedure|LinearStaticAnalysis)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(Mitc4DrillingScale|Mitc4Shell[^.]*|Mitc4Covariance|NonlinearMitc4[^.]*|NonlinearStaticProcedure|LinearStaticAnalysis)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `Mitc4Covariance.MfeC08PartialBcCovariance`
- `Mitc4Covariance.MfeC09StaticReactionCovariance`
- `Mitc4DrillingScale.MfeC10TraceInventory`
- `NonlinearMitc4Tangent.MfeC12FrozenCovariantScale`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 1에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-step1-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step1/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 1만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step1-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
+162
View File
@@ -0,0 +1,162 @@
# Step 2: Consistent→lumped 질량과 deterministic 조립
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: 동일 phase의 Step 1 completed
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-003`, `FEM-REQ-MITC4-EIGEN-004`, `FEM-REQ-MITC4-EIGEN-005`, `FEM-REQ-MITC4-EIGEN-006`, `FEM-REQ-MITC4-EIGEN-007`, `FEM-REQ-MITC4-EIGEN-011`, `FEM-REQ-MITC4-EIGEN-014`, `FEM-REQ-MITC4-EIGEN-018`, `FEM-REQ-MITC4-EIGEN-026`
- Logical cases: `MFE-C01`, `MFE-C02`, `MFE-C03`, `MFE-C04`, `MFE-C05`, `MFE-C06`, `MFE-C07`, `MFE-C11`, `MFE-C20`
- I/O obligations: `IO-T02`, `IO-T04`, `IO-T11`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md), [numerical-review-evidence.md#독립-mass-oracle](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md#독립-mass-oracle), [numerical-review-controls.md#c2-matrix-mass-stabilization와-reduction](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md#c2-matrix-mass-stabilization와-reduction), [formulation-mass.md#m4-계산된-consistent-moment에서-nodal-block-유도](../../docs/mitc4-shell-feast-eigen/formulation-mass.md#m4-계산된-consistent-moment에서-nodal-block-유도), [formulation-mass.md#m5-보존되는-양과-근사되는-양](../../docs/mitc4-shell-feast-eigen/formulation-mass.md#m5-보존되는-양과-근사되는-양), [formulation-eigen.md#e1-조립-단위-scaling과-실제-global-제약](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e1-조립-단위-scaling과-실제-global-제약).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"include/fesa/elements/mitc4_shell.h",
"src/fesa/elements/mitc4_shell_mass.cpp",
"tests/unit/elements/mitc4_shell_test.cpp",
"tests/unit/elements/mitc4_shell_mass_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/elements/element_factory.h",
"src/fesa/elements/element_factory.cpp",
"include/fesa/assembly/shell_mass_assembler.h",
"src/fesa/assembly/shell_mass_assembler.cpp",
"tests/unit/elements/element_factory_test.cpp",
"tests/unit/assembly/shell_mass_assembler_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step2-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. 27점 consistent scalar moments와 물리 관성
Symbols: `Mitc4ConsistentMass; Mitc4Shell::ConsistentMass(double density); fixed 3x3x3 mass quadrature`.
**RED:** Flat4x2 rho3 t1/2의 exact C0/C1/C2, 24-matrix energy 및 physical20 positive rank/null을 검사해 API 부재 failure를 관찰한다. Rational warped/director-varying fixture는 NR의 exact coefficient/row oracle를 test-local 독립 polynomial integration 또는 5-point direct particle integration으로 구성한다. Production ShapeFunctions/EvaluateGeometry 재호출 oracle는 금지한다. 강제 C1=0/2-point/flat C2 mutation은 오류를 검출해야 한다.
**Minimal GREEN:** Mitc4Shell의 기존 geometry evaluator를 같은 sign/원형상으로 27점에 적용하는 member 구현을 새 cpp에 둔다. M5의 C0/C1/C2 snapshot과 consistent24를 먼저 완성·검증해 반환한다. Quadrature loop 순서/finite/positive geometry와 rho 검사는 계약대로 한다. 5/6을 mass에 곱하거나 곡면 odd coupling을 생략하지 않는다. Lumped/FEAST/global dense MC는 이 단계에 넣지 않는다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
### 2. Moment 유도 lumping과 deterministic nodal 조립
Symbols: `Mitc4LumpedMass; DeriveLumpedMass(consistent snapshot, directors); ElementFactory::CreateMitc4Shell; ShellMassAssembler::Assemble`.
**RED:** C1/C2 symmetric perturbation을 consistent snapshot에 주어 derived block도 독립 integral대로 변하는지 먼저 실패시킨다. m/h/j positivity·central variance·rank5·drill null·spatial centroid와 Jensen work를 검사한다. m=1,2,4 grid의 velocity(x,0,0)에서 MC work4/3, difference8/(3m²)를 독립 기대값으로 사용한다. Two-rho/t patch의 source/scatter 및 parallel scheduling permutations를 검사한다.
**Minimal GREEN:** M6/M7의 scalar moment row-sum으로 nodal6 blocks를 만든다. 원 snapshot을 덮어쓰지 않는다. Typed factory 생성 경계에서 generic Element 생성과 동일 검증·runtime layout을 재사용하고 solver consumer의 downcast/type switch를 추가하지 않는다. Mass assembler는 DOF owner의 scatter로 index-owned contributions를 stable source order로 reduce한다. K는 기존 SparseAssembler/ElementView 경로를 재사용한다. Source/section/material별 rho·t 및 nodal incident kd 합을 보존한다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(Mitc4ShellMass|Mitc4ShellKinematics|Mitc4ShellKernel|ElementFactory|ShellMassAssembler|SparseAssembler)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(Mitc4ShellMass|Mitc4ShellKinematics|Mitc4ShellKernel|ElementFactory|ShellMassAssembler|SparseAssembler)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `Mitc4ShellMass.MfeC01FlatMomentOracle`
- `Mitc4ShellMass.MfeC02CurvedParticleOracle`
- `Mitc4ShellMass.MfeC03DerivedSnapshotAndJensen`
- `ShellMassAssembler.MfeC04RefinementEnergy`
- `Mitc4ShellMass.MfeC05RotatedMassAndCentroid`
- `ShellMassAssembler.MfeC06SourceAndParallelOrder`
- `Mitc4ShellMass.MfeC07InvalidMassGeometry`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 2에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-step2-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step2/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 2만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step2-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
+145
View File
@@ -0,0 +1,145 @@
# Step 3: 실제 제약의 null 공간과 sparse whitening
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: 동일 phase의 Step 2 completed
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-006`, `FEM-REQ-MITC4-EIGEN-007`, `FEM-REQ-MITC4-EIGEN-008`, `FEM-REQ-MITC4-EIGEN-009`, `FEM-REQ-MITC4-EIGEN-012`, `FEM-REQ-MITC4-EIGEN-013`, `FEM-REQ-MITC4-EIGEN-014`, `FEM-REQ-MITC4-EIGEN-018`
- Logical cases: `MFE-C08`, `MFE-C11`, `MFE-C13`, `MFE-C14`, `MFE-C15`, `MFE-C16`, `MFE-C20`
- I/O obligations: `IO-T04`, `IO-T05`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [formulation-eigen.md#e1-조립-단위-scaling과-실제-global-제약](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e1-조립-단위-scaling과-실제-global-제약), [formulation-eigen.md#e2-nullpositive-basis를-node마다-결정](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e2-nullpositive-basis를-node마다-결정), [formulation-eigen.md#e5-spd-whitening-복원과-sparsity](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e5-spd-whitening-복원과-sparsity), [numerical-review-controls.md#c2-matrix-mass-stabilization와-reduction](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md#c2-matrix-mass-stabilization와-reduction).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"include/fesa/fem/dof_manager.h",
"src/fesa/fem/dof_manager.cpp",
"src/fesa/analysis/eigen_reduction.h",
"src/fesa/analysis/eigen_reduction.cpp",
"tests/unit/fem/dof_manager_test.cpp",
"tests/unit/analysis/eigen_reduction_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"docs/mitc4-shell-feast-eigen/implementation-step3-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. 실제 BC의 analytic null, nodal Cholesky와 sparse whitening
Symbols: `DofManager::BuildEigenLayout/EigenSparsePattern; eigen_internal::ReduceEigenSystem/RestoreEigenvector; EigenReduction`.
**RED:** C13의 supported director/component-mask inventory로 exact n/nz/P/Z와 global n0/N>n 실패를 고정한다. C14 p=1/2000 positive5 pass, p=1e-8 analytic5 conditioning fail, p=0 null1을 검사한다. C15의 일반 singular pencil exact2.5 vs 삭제3을 test-local oracle로 보존하고 production에 nonzero Kpz/nonpositive Kzz를 주입해 거부시킨다. C16 SPD pencil의2,10/3 및 full original residual 복원을 검사한다.
**Minimal GREEN:** E1~E5와 C2의 analytic BC/director intersection만 rank로 사용한다. Nodal≤6 P/Z/L과 rcond>=2^-32, MZ/KZ/PZ/Kzz checks 및 global scale ell을 계산한다. Positive counts는 DOF owner로 넘겨 stable finite offsets/pattern을 받고 block triangular congruence로 sparse A를 구성한다. 원 free K/ML은 residual용으로 보존한다. Global inverse/dense Schur/artificial mass/cutoff/local URZ 삭제는 금지한다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(EigenReduction|DofManager|ShellMassAssembler|Mitc4Covariance)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(EigenReduction|DofManager|ShellMassAssembler|Mitc4Covariance)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `EigenReduction.MfeC13ExactBoundaryNullIntersection`
- `EigenReduction.MfeC14NearNullConditioning`
- `EigenReduction.MfeC15RejectsInvalidDecoupling`
- `EigenReduction.MfeC16NodalWhitening`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 3에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-step3-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step3/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 3만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step3-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
+165
View File
@@ -0,0 +1,165 @@
# Step 4: MKL FEAST adapter와 bounded lowest-N 검색
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: 동일 phase의 Step 3 completed
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-009`, `FEM-REQ-MITC4-EIGEN-010`, `FEM-REQ-MITC4-EIGEN-011`, `FEM-REQ-MITC4-EIGEN-012`, `FEM-REQ-MITC4-EIGEN-013`, `FEM-REQ-MITC4-EIGEN-023`
- Logical cases: `MFE-C17`, `MFE-C18`, `MFE-C19`, `MFE-C21`, `MFE-C22`
- I/O obligations: `IO-T06`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [formulation-eigen.md#e7-feast-경계와-deterministic-실행](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e7-feast-경계와-deterministic-실행), [numerical-review-controls.md#c5-feast-controls와-bounded-interval-정책](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md#c5-feast-controls와-bounded-interval-정책), [numerical-review-controls.md#c6-initial-subspace-thread와-storage](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md#c6-initial-subspace-thread와-storage), [io-mapping.md#m2-backend와-failure-lifecycle](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m2-backend와-failure-lifecycle), [formulation-eigen.md#e6-유한-search-interval과-요청-개수](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e6-유한-search-interval과-요청-개수), [io-schema.md#o4-backend와-검증-evidence](../../docs/mitc4-shell-feast-eigen/io-schema.md#o4-backend와-검증-evidence).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"src/fesa/solvers/eigen/feast_backend.h",
"src/fesa/solvers/eigen/feast_backend.cpp",
"src/fesa/solvers/eigen/feast_initial_space.h",
"src/fesa/solvers/eigen/feast_initial_space.cpp",
"tests/unit/solvers/eigen/feast_backend_test.cpp",
"tests/unit/solvers/eigen/feast_initial_space_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/solvers/eigen/eigen_solver.h",
"include/fesa/solvers/eigen/mkl_feast_eigen_solver.h",
"src/fesa/solvers/eigen/mkl_feast_eigen_solver.cpp",
"src/fesa/solvers/eigen/feast_search.h",
"src/fesa/solvers/eigen/feast_search.cpp",
"tests/unit/solvers/eigen/eigen_solver_test.cpp",
"tests/unit/solvers/eigen/mkl_feast_eigen_solver_test.cpp",
"tests/unit/solvers/eigen/feast_search_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step4-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. 실제 MKL FEAST call, CSR/자원/initial-space 계약
Symbols: `eigen_internal::FeastBackend/FeastCallRequest/FeastCallResult; BuildFeastInitialSpace; actual feastinit/dfeast_scsrgv private calls`.
**RED:** Private request tests에 malformed/missing/duplicate/nonfinite/0-based/out-of-range CSR, n²/n*m0/nnz+1 representation overflow와 allocation injection을 추가한다. Fixed uint64 sequence와 QR orthogonality/rank-failure, thread-local restore on every exit를 검사한다. 실제 linked MKL의 full-enclosure count/solve smoke test를 추가해 부재를 관찰한다. Mock call 성공을 real backend evidence로 대신하지 않는다.
**Minimal GREEN:** C5/C6의 one-based upper CSR/identity B, fpm snapshots, count scratch n×n, m0 overwritten count와 solve m 구분을 구현한다. Neutral std integer records 밖 vendor MKL_INT를 노출하지 않는다. Per-call feastinit, fixed seed/nonpivoted QR, local thread guard, checked allocation RAII, raw status/history를 보존한다. API smoke의 enclosure는 matrix-derived로 만들고 known values로 fitting하지 않는다. Lowest-N search/completeness gate는 Step4에서 완성한다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
### 2. Prefix/guard/count 기반 lowest-N FEAST 탐색
Symbols: `EigenSolver::SolveLowest; MklFeastEigenSolver::SolveLowest; eigen_internal::SearchFeastSpectrum; EigenSolveResult/FeastCallEvidence`.
**RED:** Actual C17 zero/N=n/simple spectra 및 C18 fortyfold cluster>N/tight distinct/dense-pattern spectra를 production search로 풀고 independent known ordered values/count history와 대조한다. Injected false count/low-mode omission이 residual·Gram만 통과해도 search는 실패해야 한다. C21 statuses/endpoint/nonmonotone/total!=n/m!=c와 C22 count512/solve3 경계 및 certified fallback을 먼저 실패시킨다.
**Minimal GREEN:** A의 stable inf scale와 outward Gershgorin, C5 delta/guard/prefix/32+32 search/384+128 budget/ordered collision offsets를 구현한다. Safe c>=N bracket 및 m0 formula, admissible retry3·금지 retry, final prefix0/actual interval count 및 all-c columns를 반환한다. Count source는 실제 backend, zero count는 info0만 인정한다. Public request N은 불변이며 scale0의 model-derived fallback은 caller가 전달한다. Actual raw negative 값을 backend에서 clamp하지 않는다. C3의 full original-space validation은 Step5 소유다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(FeastBackend|FeastInitialSpace|MklPardisoSolver|EigenSolver|MklFeastEigenSolver|FeastSearch)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(FeastBackend|FeastInitialSpace|MklPardisoSolver|EigenSolver|MklFeastEigenSolver|FeastSearch)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `MklFeastEigenSolver.MfeC17KnownLowestSpectra`
- `MklFeastEigenSolver.MfeC18RepeatedAndTightClusters`
- `FeastBackend.MfeC19RawSignedSpectra`
- `FeastSearch.MfeC21StatusAndHistoryFailures`
- `FeastSearch.MfeC22FiniteBudgetsAndCapacity`
- `FeastInitialSpace.MfeC22SeedQrAndRepresentation`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 4에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-step4-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step4/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 4만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step4-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
+161
View File
@@ -0,0 +1,161 @@
# Step 5: 전체 c 검증과 별도 frequency procedure
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: 동일 phase의 Step 4 completed
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-001`, `FEM-REQ-MITC4-EIGEN-002`, `FEM-REQ-MITC4-EIGEN-003`, `FEM-REQ-MITC4-EIGEN-007`, `FEM-REQ-MITC4-EIGEN-008`, `FEM-REQ-MITC4-EIGEN-009`, `FEM-REQ-MITC4-EIGEN-010`, `FEM-REQ-MITC4-EIGEN-011`, `FEM-REQ-MITC4-EIGEN-012`, `FEM-REQ-MITC4-EIGEN-013`, `FEM-REQ-MITC4-EIGEN-014`, `FEM-REQ-MITC4-EIGEN-017`, `FEM-REQ-MITC4-EIGEN-018`, `FEM-REQ-MITC4-EIGEN-019`
- Logical cases: `MFE-C06`, `MFE-C08`, `MFE-C11`, `MFE-C13`, `MFE-C14`, `MFE-C16`, `MFE-C17`, `MFE-C18`, `MFE-C19`, `MFE-C20`, `MFE-C21`, `MFE-C23`, `MFE-C24`, `MFE-C27`
- I/O obligations: `IO-T01`, `IO-T02`, `IO-T04`, `IO-T05`, `IO-T06`, `IO-T07`, `IO-T11`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md), [numerical-review-controls.md#c3-eigenpair-및-물리-내부-판정](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md#c3-eigenpair-및-물리-내부-판정), [numerical-review-controls.md#c4-repeated-subspace와-결정론](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md#c4-repeated-subspace와-결정론), [io-schema.md#o3-고유치와-modal-vectors](../../docs/mitc4-shell-feast-eigen/io-schema.md#o3-고유치와-modal-vectors), [io-schema.md#o4-backend와-검증-evidence](../../docs/mitc4-shell-feast-eigen/io-schema.md#o4-backend와-검증-evidence), [io-mapping.md#m1-input에서-equationresult까지](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m1-input에서-equationresult까지), [io-mapping.md#m2-backend와-failure-lifecycle](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m2-backend와-failure-lifecycle), [formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md), [formulation-stabilization.md#s6-nr-mfe-001의-새-algebraic-target과-정적-대응](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md#s6-nr-mfe-001의-새-algebraic-target과-정적-대응).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"include/fesa/analysis/eigen_analysis_state.h",
"src/fesa/analysis/eigen_analysis_state.cpp",
"src/fesa/analysis/eigen_validation.h",
"src/fesa/analysis/eigen_validation.cpp",
"tests/unit/analysis/eigen_analysis_state_test.cpp",
"tests/unit/analysis/eigen_validation_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/analysis/linear_frequency_procedure.h",
"src/fesa/analysis/linear_frequency_procedure.cpp",
"tests/integration/analysis/linear_frequency_procedure_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step5-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. 전체 c 검증, raw mode 분류와 N개 candidate state
Symbols: `EigenAnalysisState::Swap; eigen_internal::ValidateEigenpairs; EigenMode/EigenpairCheck/EigenVerificationEvidence`.
**RED:** C16 wrong mass/lambda/pairing/constraint/null coordinate 및 c>N의 버려질 column만 손상한 결과를 주입해 실패시킨다. eta_r/eta_w/rho_B/Gram/norm/energy 각각 boundary와 zero branch를 검사한다. Actual C18 solver 결과에 all-c metrics를 적용하고 repeated projector3회, C19 ±tau/nextafter·smallnegative frequency omission·positive underflow/overflow를 검사한다.
**Minimal GREEN:** V1~V5/C1~C4의 같은 실제 ML로 복원·mass normalize·full original free residual·operator residual·전체 c Gram/energy를 계산한다. 실패한 column을 truncation으로 숨기지 않는다. Stable paired sort/sign/connected diagnostic cluster 뒤 처음 N만 state에 저장하고 전체 c scalar checks/call history는 보존한다. O3/O4 raw negative/classification/frequency subset와 validity flags를 정확히 구현한다. Prepared state의 Swap은 allocation/validation 없이 noexcept이어야 한다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
### 2. 별도 frequency lifecycle의 domain-to-mode 통합
Symbols: `LinearFrequencyProcedureExecutor::Execute; LinearFrequencyExecutionResult`.
**RED:** Small input→Domain→actual FEAST→candidate의 typed integration을 먼저 추가한다. C08 lambda10369/450와 rotated same BC, free6 rigid modes, n0/N>n/mixed-node-rank0, source renumbering, density4/unit1024와 원 constraints를 검증한다. Spy static/nonlinear executor를 전혀 호출하지 않음, 실패 시 기존 accepted state 미변경을 검사한다.
**Minimal GREEN:** Executor는 typed factory/kernel→consistent snapshot→lumped→deterministic K/ML→DofManager→ReduceEigenSystem→SolveLowest→ValidateEigenpairs 순서를 소유한다. Model validation 완료 후 source location을 backend diagnostics에 연결한다. Domain/view/workspace lifetime을 유지하고 candidate를 반환한다. LinearStaticAnalysis::Run은 변경하지 않는다. Output path/log/final replacement는 Step6에서 연결하며 이 단계는 저장 성공을 주장하지 않는다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(EigenAnalysisState|EigenValidation|MklFeastEigenSolver|EigenReduction|LinearFrequencyProcedure|FrequencyDomain|Mitc4Covariance)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(EigenAnalysisState|EigenValidation|MklFeastEigenSolver|EigenReduction|LinearFrequencyProcedure|FrequencyDomain|Mitc4Covariance)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `EigenValidation.MfeC16OriginalMassAndPairing`
- `EigenValidation.MfeC19RawSignedEigenvalues`
- `LinearFrequencyProcedure.MfeC11SixPhysicalRigidModes`
- `LinearFrequencyProcedure.MfeC20DensityAndUnits`
- `LinearFrequencyProcedure.MfeC08PartialBcEigenvalue`
- `EigenValidation.MfeC21RejectsUnselectedColumnCorruption`
- `EigenAnalysisState.MfeC24NoFailSwap`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 5에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-step5-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step5/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 5만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step5-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
+168
View File
@@ -0,0 +1,168 @@
# Step 6: Additive HDF5와 CLI candidate transaction
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: 동일 phase의 Step 5 completed
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-001`, `FEM-REQ-MITC4-EIGEN-015`, `FEM-REQ-MITC4-EIGEN-016`, `FEM-REQ-MITC4-EIGEN-017`, `FEM-REQ-MITC4-EIGEN-018`, `FEM-REQ-MITC4-EIGEN-019`, `FEM-REQ-MITC4-EIGEN-021`, `FEM-REQ-MITC4-EIGEN-024`
- Logical cases: `MFE-C19`, `MFE-C23`, `MFE-C24`, `MFE-C26`
- I/O obligations: `IO-T01`, `IO-T03`, `IO-T05`, `IO-T07`, `IO-T08`, `IO-T10`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md), [io-mapping.md#m2-backend와-failure-lifecycle](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m2-backend와-failure-lifecycle), [io-input.md#i6-fail-closed-validation과-diagnostics](../../docs/mitc4-shell-feast-eigen/io-input.md#i6-fail-closed-validation과-diagnostics), [formulation-eigen.md#e8-mode-identity-normalization과-상태](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md#e8-mode-identity-normalization과-상태).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"include/fesa/results/eigen_results_writer.h",
"include/fesa/io/hdf5/eigen_hdf5_results_writer.h",
"src/fesa/io/hdf5/eigen_hdf5_results_writer.cpp",
"src/fesa/io/hdf5/eigen_hdf5_schema.h",
"src/fesa/io/hdf5/eigen_hdf5_schema.cpp",
"src/fesa/io/hdf5/hdf5_model_writer.h",
"src/fesa/io/hdf5/hdf5_model_writer.cpp",
"tests/unit/results/eigen_results_writer_test.cpp",
"tests/unit/io/hdf5/eigen_hdf5_results_writer_test.cpp",
"tests/unit/io/hdf5/eigen_hdf5_schema_test.cpp",
"tests/unit/io/hdf5/hdf5_model_writer_test.cpp",
"src/fesa/CMakeLists.txt",
"tests/CMakeLists.txt",
"include/fesa/analysis/prepared_analysis.h",
"src/fesa/analysis/prepared_analysis.cpp",
"src/fesa/app/fesa_application.cpp",
"tests/unit/analysis/prepared_analysis_test.cpp",
"tests/integration/app/fesa_application_test.cpp",
"tests/integration/app/frequency_application_test.cpp",
"tests/integration/analysis/linear_frequency_procedure_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-step6-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. Additive eigen HDF5 write/self-check
Symbols: `EigenResultsWriter::Write; EigenHdf5ResultsWriter::Write; hdf5_internal::WriteEigenSchema/SelfCheckEigen; model-only WriteModelData`.
**RED:** 독립 HDF5 C API reader test에서 O1~O5 inventory의 exact types/compound fields/shapes/attributes를 기대해 missing writer/schema failure를 관찰한다. N/c/request/source Step-2 vs group Step-1, negative/zero/positive frequencies, flags/units/source records/128 fpm를 검증한다. Missing/duplicate/extra mode/nonfinite/wrong procedure/mass/backend/dimension 및 reopen/self-check failure를 각각 주입한다. 기존 static schema0/1 reader test도 실행한다.
**Minimal GREEN:** 새 eigen serializer/self-check를 별도 private module로 구현한다. 기존 model writer에서 metadata-free model dataset 작성 seam만 분리해 공유하며 static WriteModel의 output은 보존한다. N persistent vectors, all-c scalar metrics/call history와 exact source identity를 쓴다. Candidate write/flush/close/reopen/self-check 후 기존 AtomicFinalizeValidatedCandidate를 사용한다. HDF5/Win32 types는 private이고 official final path 계약은 그대로다. Static result/reaction/accepted_frames를 eigen에 만들지 않는다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
### 2. CLI dispatch, log/lock와 final-state transaction
Symbols: `PreparedAnalysisOutcome frequency variant; ExecutePreparedAnalysis/FinalizePreparedAnalysisResult frequency overload; FesaApplication::Run`.
**RED:** FesaApplication의 유일 CLI 입력으로 small frequency file을 실행해 lexical sibling h5/log와 exit0를 기대한다. 원본 no-op provenance와 stable source diagnostics, input/model/solver/output exit3/4/5/6를 검사한다. 기존 final/state hash를 준비하고 solve, validation, log open/close, lease, write/flush/close/reopen/self-check/replace failure를 각각 주입한다. First-run failure는 final 부재를 검사한다.
**Minimal GREEN:** Prepared boundary에 별도 frequency executor/result/writer를 선택하는 overload를 추가하며 static 호출부 호환성을 유지한다. 기존 exclusive lease→log open/truncate→prepare/execute→log close→candidate finalization 순서에 연결한다. Eigen 정상 log는0bytes. Final replacement 성공 뒤 이미 준비된 EigenAnalysisState의 noexcept swap만 수행한다. 실패 state/final 보존을 generic 성공 bool로 숨기지 않는다. 테스트 주입 seam은 기존 private/injected interfaces 안에 두며 public CLI 옵션은 추가하지 않는다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(EigenResultsWriter|EigenHdf5ResultsWriter|EigenHdf5Schema|Hdf5ModelWriter|Hdf5ResultsWriter|NonlinearHdf5ResultsWriter|Hdf5WriterComponents|PreparedAnalysis|FrequencyApplication|FesaApplication|LinearFrequencyProcedure|ShellSurfacePressureApplication)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(EigenResultsWriter|EigenHdf5ResultsWriter|EigenHdf5Schema|Hdf5ModelWriter|Hdf5ResultsWriter|NonlinearHdf5ResultsWriter|Hdf5WriterComponents|PreparedAnalysis|FrequencyApplication|FesaApplication|LinearFrequencyProcedure|ShellSurfacePressureApplication)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `EigenHdf5Schema.MfeC24RoundTripAndRejection`
- `FrequencyApplication.MfeC24PreservesFinalAndState`
- `EigenHdf5ResultsWriter.MfeC24AtomicCandidateFailures`
- `PreparedAnalysis.MfeC23DispatchesFrequency`
- `Hdf5ModelWriter.MfeC26StaticInventoryPreserved`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 6에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-step6-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step6/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 6만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step6-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
+167
View File
@@ -0,0 +1,167 @@
# Step 7: Value-only comparator·fresh reference·구현 evidence
- Feature ID: `mitc4-shell-feast-eigen`
- Plan owner: `implementation-planning-agent`
- Execution owner: `implementation-agent`
- Input contract revision: `r2`
- Phase: `mitc4-shell-feast-eigen`
- Dependency: 동일 phase의 Step 6 completed
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-001`, `FEM-REQ-MITC4-EIGEN-002`, `FEM-REQ-MITC4-EIGEN-003`, `FEM-REQ-MITC4-EIGEN-004`, `FEM-REQ-MITC4-EIGEN-005`, `FEM-REQ-MITC4-EIGEN-006`, `FEM-REQ-MITC4-EIGEN-007`, `FEM-REQ-MITC4-EIGEN-008`, `FEM-REQ-MITC4-EIGEN-009`, `FEM-REQ-MITC4-EIGEN-010`, `FEM-REQ-MITC4-EIGEN-011`, `FEM-REQ-MITC4-EIGEN-012`, `FEM-REQ-MITC4-EIGEN-013`, `FEM-REQ-MITC4-EIGEN-014`, `FEM-REQ-MITC4-EIGEN-015`, `FEM-REQ-MITC4-EIGEN-016`, `FEM-REQ-MITC4-EIGEN-017`, `FEM-REQ-MITC4-EIGEN-018`, `FEM-REQ-MITC4-EIGEN-019`, `FEM-REQ-MITC4-EIGEN-020`, `FEM-REQ-MITC4-EIGEN-021`, `FEM-REQ-MITC4-EIGEN-022`, `FEM-REQ-MITC4-EIGEN-023`, `FEM-REQ-MITC4-EIGEN-024`, `FEM-REQ-MITC4-EIGEN-025`, `FEM-REQ-MITC4-EIGEN-026`, `FEM-REQ-MITC4-EIGEN-027`
- Logical cases: `MFE-C06`, `MFE-C08`, `MFE-C09`, `MFE-C11`, `MFE-C12`, `MFE-C17`, `MFE-C18`, `MFE-C20`, `MFE-C23`, `MFE-C24`, `MFE-C25`, `MFE-C26`, `MFE-C27`
- I/O obligations: `IO-T01`, `IO-T04`, `IO-T05`, `IO-T07`, `IO-T08`, `IO-T09`, `IO-T10`, `IO-T11`
## 필수 입력과 계약
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
- [AGENTS.md](../../AGENTS.md)
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/SOLVER_AGENT_DESIGN.md)
- [docs/FEATURE_DOCUMENTATION.md](../../docs/FEATURE_DOCUMENTATION.md)
- [docs/PRD.md](../../docs/PRD.md)
- [docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
- [docs/ADR.md](../../docs/ADR.md)
- [docs/CODINGSTYLE.md](../../docs/CODINGSTYLE.md)
- [docs/TOLERANCE.md](../../docs/TOLERANCE.md)
- [.codex/skills/fem-implementation-tdd/SKILL.md](../../.codex/skills/fem-implementation-tdd/SKILL.md)
- [.agents/skills/harness/SKILL.md](../../.agents/skills/harness/SKILL.md)
- [.codex/agents/implementation-agent.toml](../../.codex/agents/implementation-agent.toml)
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md)
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/PRD.md)
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/ADR.md)
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/coordination.md)
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/requirements.md)
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md)
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/research.md)
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/research-evidence.md)
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md)
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation-mass.md)
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation-eigen.md)
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation-verification.md)
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation-stabilization.md)
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/numerical-review.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/numerical-review-evidence.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/numerical-review-controls.md)
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md)
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md)
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/io.md)
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/io-input.md)
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/io-schema.md)
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/io-mapping.md)
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/implementation-plan.md)
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/implementation-interfaces.md)
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)
이 Step의 직접 계약: [io-mapping.md#m3-원본-txt-grammar와-deterministic-value-projection](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m3-원본-txt-grammar와-deterministic-value-projection), [io-mapping.md#m4-판정보고와-기존-static의-역할](../../docs/mitc4-shell-feast-eigen/io-mapping.md#m4-판정보고와-기존-static의-역할), [reference-model.md](../../docs/mitc4-shell-feast-eigen/reference-model.md), [../TOLERANCE.md](../../docs/mitc4-shell-feast-eigen/../TOLERANCE.md), [requirements-evidence.md#필수-회귀-포트폴리오와-identity](../../docs/mitc4-shell-feast-eigen/requirements-evidence.md#필수-회귀-포트폴리오와-identity), [numerical-review-cases.md#p4-ioreference운영-closure](../../docs/mitc4-shell-feast-eigen/numerical-review-cases.md#p4-ioreference운영-closure).
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/implementation-verification.md)을 함께 적용한다.
## Owned paths
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
```json
[
"tests/reference/eigen_reference_comparison.h",
"tests/reference/eigen_reference_comparison.cpp",
"tests/reference/eigen_reference_comparison_test.cpp",
"tests/CMakeLists.txt",
"tests/reference/eigen_reference_cases_test.cpp",
"tests/reference/mitc4_eigen_static_regression_test.cpp",
"tests/integration/analysis/linear_frequency_procedure_test.cpp",
"docs/mitc4-shell-feast-eigen/implementation-report.md",
"docs/mitc4-shell-feast-eigen/build-test.md",
"docs/mitc4-shell-feast-eigen/reference-comparison.md",
"docs/mitc4-shell-feast-eigen/reference-comparison-detail.md",
"docs/mitc4-shell-feast-eigen/implementation-step7-evidence.md"
]
```
## 같은 session의 behavior별 TDD
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
### 1. 원본 TXT Value-only deterministic comparator
Symbols: `EigenReferenceComparison::Compare/WriteDeterministicJson; exact TXT parser and source-key projection`.
**RED:** Test-local synthetic TXT/HDF5 fixture로 reordered rows/equalValue distinct IDs와 Freq token 변경을 허용하고 missing/extra/duplicate/malformed/BOM/NaN/Inf/wronglabel/step/quantity/unit/mass/backend/schema를 tolerance 이전 실패시킨다. 양수 singleton 1% RMS 경계/nextafter·5% row 경계/nextafter, rowpass-RMSfail, generic near-zero B 경계 및 S0 cases를 먼저 고정한다.
**Minimal GREEN:** IO-M3 full-match grammar의 모든 nonempty TXT rows를 읽고 입력 sole source step/N을 authority로 연결한다. Official modes.eigenvalue만 추출하고 source content identity/path를 확인한다. Existing ReferenceTolerancePolicy::Evaluate를 10singleton family에 적용하며 policy source는 수정하지 않는다. Deterministic report는 raw r/f/e, source keys/family/S/branch/RMS/prechecks를 모두 기록한다. Diagnostic all-c, frequencies/vectors는 비교량이나 fallback이 아니다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
### 2. Fresh 10모드·static portfolio·반복 실행 및 최종 구현 evidence
Symbols: `EigenReferenceCases.FreshInputUsesTenBlockingValueFamilies; EigenReferenceCases.ReplaysPersistentModesAndRepeatsDeterministically; Mitc4EigenStaticRegression.FreshApprovedPortfolio`.
**RED:** 새 fresh-run harness에 invocation counter/identity corruption fixture를 먼저 추가해 stale HDF5 또는 다른 binary/source content의 결과를 거부하는 failure를 관찰한다. 이미 구현된 eigenvalue가 reference와 통과할 수 있다는 이유로 의도적인 물리 failure를 만들지 않는다. Tests는 고유 execution directory에 원본 bytes 복사→직접 FesaApplication 호출→HDF5 읽기를 요구하고 cache-only path는 failure로 만든다. 이후 실제 지정 reference 및 기존 static portfolio를 실행한다.
**Minimal GREEN:** Reference 실행 wrapper와 evidence projection만 보완한다. 원본 SHA-256/bytes/mtime 전후 동일, copied input byte equality, actual run exit/duration, binary/library hash와 result/log timestamp/hash를 기록한다. 새 eigen은 같은binary/runtime/thread/input3runs에서 N10/n3125/nz625와 raw Value10singleton 비교·N벡터 residual 재현·C4 결정론을 검증한다. Static shell/shellNL/shellNL-meshfine fresh solve와 source-key Ublocking/URwarning/reactionreview 및 factor1 equilibrium을 기존 comparators로 평가한다. Canonical3 reports와 detail에 전 requirements 연결 및 full counts/exits/누락0를 기록하고 Physics/Release 판단은 남긴다.
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
## Focused 명령
현재 `tests/CMakeLists.txt`에서 `fesa_tests`는 unit/integration/reference 세 executable을
모두 의존하는 aggregate다. 이 Step의 새 `tests/reference/` 파일은
`fesa_reference_tests`에 등록하며 아래 build는 이를 포함한다. Registration 누락은
필수 신규 이름별 discovery 검사에서 실패로 처리하고 full build로 RED를 대체하지 않는다.
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
```powershell
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug --target fesa_tests
ctest --test-dir .harness/build -C Debug -R '^(EigenReferenceComparison|ReferenceTolerancePolicy|EigenReferenceCases|Mitc4EigenStaticRegression|Mitc4S4Reference|NonlinearStaticReference|ShellSurfacePressureReference)\.' --show-only=json-v1
ctest --test-dir .harness/build -C Debug -R '^(EigenReferenceComparison|ReferenceTolerancePolicy|EigenReferenceCases|Mitc4EigenStaticRegression|Mitc4S4Reference|NonlinearStaticReference|ShellSurfacePressureReference)\.' --output-on-failure
```
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
### 필수 신규 test discovery inventory
- `EigenReferenceCases.MfeC25FreshTenValueFamilies`
- `EigenReferenceCases.MfeC27FreshAndRepeatedEvidence`
- `Mitc4EigenStaticRegression.MfeC26FreshApprovedPortfolio`
- `EigenReferenceComparison.MfeC25PrechecksAndToleranceBoundaries`
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
## Full VERIFY
현재 실제 backend는 config absent→CMake/Visual Studio 18 2026/x64/`.harness/build`/Debug다. Dependency cache 준비는 [environment](../../docs/mitc4-shell-feast-eigen/implementation-environment.md)의 정확한 명령과 preflight를 따른다. Generator 변경이나 preset fallback을 임의로 하지 않는다.
```powershell
cmake -S . -B .harness/build -A x64
if ($LASTEXITCODE -ne 0) { throw 'configure failed' }
cmake --build .harness/build --config Debug
if ($LASTEXITCODE -ne 0) { throw 'build failed' }
ctest --test-dir .harness/build -C Debug --show-only=json-v1
if ($LASTEXITCODE -ne 0) { throw 'discovery failed' }
ctest --test-dir .harness/build -C Debug --output-on-failure
if ($LASTEXITCODE -ne 0) { throw 'full CTest failed' }
uv run --with pytest python -B -m pytest -v -rs
if ($LASTEXITCODE -ne 0) { throw 'full pytest failed' }
```
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 7에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 이 Step에서 최종 fresh portfolio를 완료한다.
## Evidence와 종료
- `docs/mitc4-shell-feast-eigen/implementation-report.md`
- `docs/mitc4-shell-feast-eigen/build-test.md`
- `docs/mitc4-shell-feast-eigen/reference-comparison.md`
- `docs/mitc4-shell-feast-eigen/reference-comparison-detail.md`
- `docs/mitc4-shell-feast-eigen/implementation-step7-evidence.md`
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored `.harness/build/mitc4-eigen-evidence/step7/`에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 7만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step7-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
## 제외와 중단 조건
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.