modify docu
This commit is contained in:
+68
-19
@@ -1,34 +1,83 @@
|
||||
# Architecture Decision Records
|
||||
|
||||
## 철학
|
||||
Harness는 현재 프로젝트의 실제 기술 스택을 반영해야 한다. C++/MSVC 프로젝트에서 npm, Next.js, TypeScript test naming을 기본값으로 두면 agent prompt와 hook policy가 잘못된 구현을 유도한다.
|
||||
FESA의 architecture decision은 solver correctness, verification traceability, implementation testability를 우선한다. Harness는 제품이 아니라 C++/MSVC 기반 FEM 구조해석 솔버 개발을 통제하는 운영 인프라이다.
|
||||
|
||||
---
|
||||
|
||||
### ADR-001: C++ 전용 Harness
|
||||
**결정**: Harness scaffold는 C++/MSVC 전용으로 운영한다. JavaScript/TypeScript fallback은 유지하지 않는다.
|
||||
### ADR-001: FESA는 구조해석 솔버 프로젝트이고 Harness는 운영 인프라로 둔다
|
||||
**결정**: 저장소의 주 목적은 유한요소법 기반 구조해석 솔버 개발이다. Harness scaffold는 phase execution, TDD guard, commit validation, workspace validation을 제공하는 보조 계층으로 유지한다.
|
||||
|
||||
**이유**: FESA 개발 환경은 MSVC 기반 C++이다. 언어별 fallback을 남기면 validation, TDD guard, acceptance criteria가 흐려진다.
|
||||
**이유**: 기존 문서가 Harness 중심이면 agent가 solver architecture, FEM verification, Abaqus/HDF5 계약보다 운영 스크립트에 과도하게 맞춰 행동한다.
|
||||
|
||||
**트레이드오프**: 같은 Harness scaffold를 JS/TS 프로젝트에 재사용할 수 없다. 필요하면 별도 template이나 language registry를 새 ADR로 설계한다.
|
||||
**트레이드오프**: Harness 문서의 비중은 낮아지지만, 검증 명령과 hook 정책은 계속 필수 운영 규칙으로 유지한다.
|
||||
|
||||
### ADR-002: CMake/MSVC/x64/Debug 기본 검증
|
||||
**결정**: 기본 workspace validation은 CMake, Visual Studio 17 2022 generator, x64 platform, Debug config, CTest로 수행한다.
|
||||
### ADR-002: C++17/MSVC/CMake/CTest를 기본 구현 환경으로 둔다
|
||||
**결정**: 기본 solver 구현과 validation은 C++17 이상, Visual Studio 17 2022 generator, x64 platform, Debug config, CMake, CTest로 수행한다.
|
||||
|
||||
**이유**: MSVC 환경에서 CMake/CTest는 source tree가 복원되거나 새 C++ project가 추가될 때 가장 일관된 build/test entry point다.
|
||||
**이유**: FESA의 목표 환경은 Windows/MSVC 기반 C++이다. CMake/CTest는 solver source tree가 추가되거나 확장될 때 가장 일관된 build/test entry point다.
|
||||
|
||||
**트레이드오프**: Visual Studio solution-only project는 기본 지원하지 않는다. 명시적으로 필요하면 `HARNESS_VALIDATION_COMMANDS`로 override한다.
|
||||
**트레이드오프**: Visual Studio solution-only workflow는 기본 지원하지 않는다. 필요하면 `HARNESS_VALIDATION_COMMANDS`로 override한다.
|
||||
|
||||
### ADR-003: 엄격한 C++ TDD Guard
|
||||
**결정**: C++ production file 변경은 관련 C++ test file이 없으면 차단한다.
|
||||
### ADR-003: Abaqus `.inp` full compatibility가 아니라 기능별 keyword subset을 지원한다
|
||||
**결정**: FESA parser는 Abaqus keyword/data/comment line 규칙을 따르되, 기능별로 승인된 keyword subset만 지원한다. 미지원 keyword는 명확한 diagnostic을 남긴다.
|
||||
|
||||
**이유**: Harness의 핵심 목적은 agent가 검증 없는 C++ 변경을 만들지 않도록 하는 것이다. Header 중심 C++ 구조에서도 module 또는 basename 기반 테스트 존재를 확인한다.
|
||||
**이유**: full Abaqus compatibility는 초기 solver 범위와 검증 비용을 과도하게 키운다. 기능별 subset은 요구조건, I/O contract, reference validation을 추적 가능하게 만든다.
|
||||
|
||||
**트레이드오프**: 사용자는 기존 Abaqus input file을 그대로 사용할 수 없을 수 있다. 대신 지원 범위와 실패 원인이 명확해진다.
|
||||
|
||||
### ADR-004: Domain, AnalysisModel, DofManager, AnalysisState를 분리한다
|
||||
**결정**: `Domain`은 입력 모델 정의를 소유하고, `AnalysisModel`은 현재 step의 실행 view를 제공하며, `DofManager`는 equation numbering과 constrained/free mapping을 전담하고, `AnalysisState`는 해석 중 변하는 물리량을 소유한다.
|
||||
|
||||
**이유**: 모델 정의, step activation, equation system, transient/nonlinear state가 섞이면 parser, assembler, solver, result writer가 강하게 결합된다. 분리된 상태 모델은 선형 정적 해석에서 시작해 비선형, 동적, thermal coupling으로 확장하기 쉽다.
|
||||
|
||||
**트레이드오프**: 초기 class 수가 늘어난다. Phase 1에서는 interface를 얇게 유지하고 displacement 중심 state부터 구현한다.
|
||||
|
||||
### ADR-005: 공식 결과 파일은 HDF5로 하고 CSV는 비교 view로 제한한다
|
||||
**결정**: FESA solver의 authoritative result output은 HDF5이다. CSV는 reference comparison을 위한 deterministic view 또는 임시 검증 artifact로만 사용한다.
|
||||
|
||||
**이유**: 구조해석 결과는 step/frame, field/history, node/element/integration point location, units, coordinate system, schema version을 함께 가져야 한다. HDF5는 이 계층 구조와 metadata를 안정적으로 표현한다.
|
||||
|
||||
**트레이드오프**: reference comparison은 HDF5 dataset identity와 deterministic CSV view identity를 모두 관리해야 한다. CSV-only bundle은 transition artifact로만 허용하고, 기본 ready 상태는 `results.h5`/`reference.h5`와 `csv/` view 계약을 모두 만족해야 한다.
|
||||
|
||||
### ADR-006: 해석 알고리즘과 수치 backend는 Strategy와 Adapter 경계 뒤에 둔다
|
||||
**결정**: `Analysis`, `LinearSolver`, `TimeIntegrator`, `ConvergenceCriteria`는 Strategy로 구성하고, MKL, TBB, HDF5 API는 adapter 계층 뒤에 둔다.
|
||||
|
||||
**이유**: 선형 정적, 비선형 정적, 동적, frequency, heat transfer 해석은 공통 흐름을 공유하지만 알고리즘과 backend가 다르다. 외부 API를 core에 노출하면 테스트 double, backend 교체, dependency review가 어려워진다.
|
||||
|
||||
**트레이드오프**: 단일 기능만 구현할 때는 adapter가 다소 장황해 보일 수 있다. 하지만 solver backend와 result writer는 장기적으로 교체 가능해야 한다.
|
||||
|
||||
### ADR-007: Analysis 실행 흐름은 Template Method로 고정한다
|
||||
**결정**: `Analysis::run()`은 `initialize -> buildAnalysisModel -> buildDofMap -> buildSparsePattern -> assemble -> applyBoundaryConditions -> solve -> updateState -> writeResults` 흐름을 고정한다.
|
||||
|
||||
**이유**: 해석 procedure가 늘어나도 공통 실행 순서가 유지되어야 검증, logging, result writing, failure classification이 일관된다.
|
||||
|
||||
**트레이드오프**: 특수 해석 절차가 공통 흐름에 맞지 않는 경우 hook point가 필요하다. 초기에는 선형 정적 해석을 기준으로 최소 hook만 둔다.
|
||||
|
||||
### ADR-008: Sparse assembly는 deterministic COO-to-CSR 경로로 시작한다
|
||||
**결정**: 초기 assembly는 element-local contribution을 COO triplet으로 수집한 뒤 CSR로 finalize한다. MKL PARDISO backend는 CSR input contract를 받는다.
|
||||
|
||||
**이유**: CSR은 MKL PARDISO와 잘 맞고, COO-to-CSR 경로는 구현과 테스트가 명확하다. deterministic reduction은 reference comparison의 재현성을 지킨다.
|
||||
|
||||
**트레이드오프**: 대규모 모델에서는 메모리와 변환 비용이 생길 수 있다. 성능 문제가 실제로 확인되면 typed batch assembly 또는 kernel 분리를 추가한다.
|
||||
|
||||
### ADR-009: TBB 병렬화는 element-local computation부터 적용한다
|
||||
**결정**: 첫 oneTBB 적용 지점은 element-local matrix/residual 계산이다. 전역 sparse write는 thread-local buffer 또는 deterministic reduction으로 제한한다.
|
||||
|
||||
**이유**: element-local 계산은 독립성이 높고 병렬화 효과가 명확하다. 전역 sparse matrix에 직접 병렬 write하면 재현성, race, ordering 문제가 생긴다.
|
||||
|
||||
**트레이드오프**: 초기 병렬화 범위가 제한된다. MKL 내부 thread와 TBB task arena의 oversubscription 정책을 별도로 문서화해야 한다.
|
||||
|
||||
### ADR-010: Abaqus reference artifact는 사람이 생성하거나 명시 승인된 절차로만 갱신한다
|
||||
**결정**: Agent는 Abaqus, Nastran 또는 reference solver를 직접 실행하지 않는다. reference artifact 생성, 수정, 복원은 명시 승인된 phase에서만 수행하고 provenance를 `metadata.json`에 기록한다.
|
||||
|
||||
**이유**: reference 결과는 solver correctness의 기준이다. 생성 절차가 불명확하면 구현 결함과 reference artifact 오류를 구분할 수 없다.
|
||||
|
||||
**트레이드오프**: reference 준비가 느려질 수 있다. 대신 검증 기준의 신뢰도와 감사 가능성이 높아진다.
|
||||
|
||||
### ADR-011: C++ production 변경은 TDD guard와 workspace validation을 통과해야 한다
|
||||
**결정**: C++ production file 변경은 관련 C++ test file이 없으면 차단한다. 기본 검증은 `python -m unittest discover -s scripts -p "test_*.py"`와 `python scripts/validate_workspace.py`를 사용한다.
|
||||
|
||||
**이유**: FEM solver 결함은 작은 부호, DOF ordering, integration rule 오류에서도 발생한다. 테스트 없는 변경을 막아야 reference validation 이전 단계에서 회귀를 줄일 수 있다.
|
||||
|
||||
**트레이드오프**: 초기 scaffolding 작업에서 guard가 엄격하게 느껴질 수 있다. 문서, CMake 설정, Harness metadata는 guard 대상에서 제외한다.
|
||||
|
||||
### ADR-004: Harness 자체 테스트 우선
|
||||
**결정**: commit hook은 먼저 Python Harness self-test를 실행한 뒤 workspace validation을 실행한다.
|
||||
|
||||
**이유**: 현재 저장소에는 C++ source tree가 없을 수 있다. Harness가 스스로 검증 가능해야 이후 phase generation과 source restoration을 안전하게 진행할 수 있다.
|
||||
|
||||
**트레이드오프**: commit 시간이 조금 늘어난다. 대신 hook/validation regressions를 빠르게 잡는다.
|
||||
|
||||
+225
-14
@@ -1,31 +1,242 @@
|
||||
# 아키텍처
|
||||
|
||||
## 목표
|
||||
이 저장소의 현재 책임은 C++/MSVC 프로젝트를 위한 Codex Harness scaffold를 제공하는 것이다. Harness는 phase execution, edit guard, commit validation, workspace validation을 분리해서 관리한다.
|
||||
FESA의 아키텍처 목표는 Abaqus `.inp` subset을 내부 semantic model로 변환하고, 유한요소 equation system을 구성해 구조해석 결과를 HDF5로 저장하며, reference comparison과 physics sanity가 가능한 C++17/MSVC 솔버 구조를 제공하는 것이다.
|
||||
|
||||
핵심 품질 속성:
|
||||
- FEM formulation traceability
|
||||
- explicit I/O contracts
|
||||
- sparse linear algebra backend isolation
|
||||
- deterministic verification
|
||||
- incremental feature addition
|
||||
- Harness 기반 TDD와 workspace validation
|
||||
|
||||
## 디렉토리 구조
|
||||
```text
|
||||
src/
|
||||
fesa/
|
||||
core/ # ids, status, diagnostics, units, small value types
|
||||
io/
|
||||
abaqus/ # .inp lexer/parser, keyword subset, include policy
|
||||
hdf5/ # HDF5 result writer/reader, schema versioning
|
||||
model/ # semantic model: nodes, elements, sets, materials, sections, steps
|
||||
fem/ # DOF space, equation numbering, quadrature, shape functions
|
||||
elements/ # truss/bar, beam, plane, solid, shell element routines
|
||||
materials/ # elastic/plastic material contracts and state variables
|
||||
assembly/ # local-to-global mapping, sparse pattern, COO/CSR assembly
|
||||
constraints/ # essential BC, MPC, penalty or elimination policies
|
||||
solvers/
|
||||
linear/ # MKL PARDISO backend, iterative backend boundary
|
||||
nonlinear/ # Newton control, residual/tangent norms, increments
|
||||
analysis/ # static, modal, dynamic, nonlinear procedure drivers
|
||||
results/ # recovery, field/history output, diagnostics
|
||||
validation/ # comparison metrics and tolerance helpers
|
||||
tests/
|
||||
unit/
|
||||
integration/
|
||||
reference/
|
||||
references/
|
||||
<feature-id>/
|
||||
<model-id>/
|
||||
model.inp
|
||||
metadata.json
|
||||
reference.h5
|
||||
csv/
|
||||
deterministic comparison views
|
||||
.codex/
|
||||
├── hooks/ # Codex hook scripts
|
||||
└── skills/ # Harness planning/review instructions
|
||||
docs/ # Project and Harness guidance
|
||||
hooks/ # Codex hook scripts
|
||||
skills/ # FESA solver and Harness instructions
|
||||
docs/ # Product, architecture, ADR, workflow artifacts
|
||||
scripts/
|
||||
├── execute.py # Phase step executor
|
||||
├── validate_workspace.py
|
||||
└── test_*.py # Harness self-tests
|
||||
phases/ # Optional generated phase plans
|
||||
execute.py # Phase step executor
|
||||
validate_workspace.py # Default validation entry point
|
||||
test_*.py # Harness self-tests
|
||||
phases/ # Optional generated phase plans
|
||||
```
|
||||
|
||||
## Harness Execution Layer
|
||||
`scripts/execute.py`:
|
||||
- creates or checks out `codex/<phase-name>`
|
||||
- refuses to run on a dirty worktree
|
||||
- requires per-step `allowed_paths`
|
||||
- stages only explicit allowed paths and runner housekeeping files
|
||||
- runs Python Harness self-tests and workspace validation before every runner-created commit
|
||||
|
||||
## 모듈 경계
|
||||
- `core`는 외부 라이브러리에 의존하지 않는다.
|
||||
- `io/abaqus`는 syntax와 semantic mapping만 담당하고 해석 알고리즘을 알지 않는다.
|
||||
- `model`은 Abaqus keyword 문자열이 아니라 solver semantic model을 가진다.
|
||||
- `fem`은 DOF, interpolation, quadrature, local/global mapping을 제공하되 특정 analysis procedure에 종속되지 않는다.
|
||||
- `elements`와 `materials`는 local residual/tangent/stress recovery 계약을 제공한다.
|
||||
- `assembly`는 sparse pattern 생성과 local contribution 조립을 담당한다.
|
||||
- `constraints`는 essential BC, MPC, penalty/elimination 정책을 분리한다.
|
||||
- `solvers`는 MKL/TBB 세부 구현을 감추는 backend boundary를 가진다.
|
||||
- `analysis`는 step/history data를 받아 procedure를 실행하고 solver backend와 result writer를 조율한다.
|
||||
- `results`는 HDF5 schema를 통해 nodal, element, integration-point, diagnostic output을 분리한다.
|
||||
- test helper는 production parser/solver 내부 상태를 우회하지 않는다.
|
||||
|
||||
## 핵심 객체 모델
|
||||
```text
|
||||
Domain
|
||||
├── Node
|
||||
├── Element
|
||||
├── Material
|
||||
├── Property
|
||||
├── NodeSet
|
||||
├── ElementSet
|
||||
├── BoundaryCondition
|
||||
├── Load
|
||||
└── StepDefinition
|
||||
|
||||
AnalysisModel
|
||||
├── active elements
|
||||
├── active loads
|
||||
├── active boundary conditions
|
||||
├── active properties/materials
|
||||
└── equation system view
|
||||
|
||||
AnalysisState
|
||||
├── displacement U
|
||||
├── velocity V
|
||||
├── acceleration A
|
||||
├── temperature T
|
||||
├── external force Fext
|
||||
├── internal force Fint
|
||||
├── residual R
|
||||
├── current time / increment / iteration
|
||||
└── element state / integration point state
|
||||
|
||||
DofManager
|
||||
├── node dof definitions
|
||||
├── constrained/free dof mapping
|
||||
├── equation numbering
|
||||
├── sparse matrix pattern ownership
|
||||
└── full/reduced vector reconstruction
|
||||
|
||||
Analysis
|
||||
├── LinearStaticAnalysis
|
||||
├── NonlinearStaticAnalysis
|
||||
├── DynamicAnalysis
|
||||
├── FrequencyAnalysis
|
||||
└── HeatTransferAnalysis
|
||||
|
||||
Element
|
||||
├── Element1D
|
||||
│ ├── Truss
|
||||
│ └── Beam
|
||||
├── Element2D
|
||||
│ ├── MITC3
|
||||
│ └── MITC4
|
||||
└── Element3D
|
||||
├── Hexahedral
|
||||
├── Tetrahedral
|
||||
├── Wedge
|
||||
└── Pyramid
|
||||
|
||||
BoundaryCondition
|
||||
├── Fix
|
||||
├── RBE2
|
||||
└── RBE3
|
||||
|
||||
Load
|
||||
├── NodalLoad
|
||||
├── PressureLoad
|
||||
└── BodyForce
|
||||
|
||||
Results
|
||||
├── ResultStep
|
||||
├── ResultFrame
|
||||
├── FieldOutput
|
||||
└── HistoryOutput
|
||||
```
|
||||
|
||||
## 상태 관리
|
||||
- `Domain`은 입력 파일에서 만들어진 전체 모델 정의를 소유한다. 파싱 이후에는 가능한 한 불변으로 취급한다.
|
||||
- `AnalysisModel`은 현재 step에서 활성화되는 해석 객체들의 실행 view이다. `Domain`을 복사하지 않고 참조 또는 id 기반 view로 구성한다.
|
||||
- `DofManager`는 자유도와 방정식 번호를 전담한다. `Node` 또는 `Element` 내부에 equation id를 분산 저장하지 않는다.
|
||||
- `AnalysisState`는 해석 중 변하는 물리량과 반복 상태를 소유한다. Phase 1에서는 displacement 중심으로 최소 구현하되, 기하비선형과 thermal-stress coupling을 위해 element/internal state 확장 지점을 유지한다.
|
||||
- 결과는 `ResultStep` -> `ResultFrame` -> `FieldOutput`/`HistoryOutput` 구조로 관리한다.
|
||||
|
||||
## 데이터 흐름
|
||||
```text
|
||||
User-approved task
|
||||
-> Harness phase files under phases/
|
||||
-> scripts/execute.py injects AGENTS.md and docs/*.md
|
||||
-> Codex executes one step at a time
|
||||
-> step updates phases/{phase}/index.json
|
||||
-> validation runs through scripts/validate_workspace.py
|
||||
Abaqus input file
|
||||
-> InputParser
|
||||
-> Domain 생성
|
||||
-> StepDefinition 루프
|
||||
-> AnalysisModel 생성
|
||||
-> DofManager로 자유도/방정식 번호 생성
|
||||
-> sparse pattern 생성
|
||||
-> Analysis 실행
|
||||
-> Assembler로 전역 행렬/벡터 조립
|
||||
-> BoundaryCondition 적용
|
||||
-> LinearSolver 또는 nonlinear/time integration loop
|
||||
-> AnalysisState 갱신
|
||||
-> ResultsWriter로 step/frame/history 저장
|
||||
-> 다음 step 진행
|
||||
```
|
||||
|
||||
## 해석 실행 흐름
|
||||
`Analysis::run()`은 Template Method로 다음 큰 흐름을 고정한다. 해석 종류별 class는 필요한 단계만 재정의한다.
|
||||
|
||||
```text
|
||||
initialize
|
||||
buildAnalysisModel
|
||||
buildDofMap
|
||||
buildSparsePattern
|
||||
assemble
|
||||
applyBoundaryConditions
|
||||
solve
|
||||
updateState
|
||||
writeResults
|
||||
```
|
||||
|
||||
비선형 정적해석은 이 흐름을 Newton-Raphson 반복 루프 안에서 사용하고, 동적해석은 time step/frame 루프 안에서 사용한다.
|
||||
|
||||
## 설계 패턴
|
||||
- Strategy Pattern: `Analysis`, `LinearSolver`, `TimeIntegrator`, `ConvergenceCriteria`를 교체 가능한 전략으로 둔다.
|
||||
- Template Method Pattern: `Analysis::run()`은 공통 실행 흐름을 고정하고 세부 단계는 procedure별로 재정의한다.
|
||||
- Factory + Registry Pattern: Abaqus keyword와 내부 객체 생성을 분리한다. 예: `*Element, type=S4` -> `MITC4ElementFactory`.
|
||||
- Adapter Pattern: MKL, TBB, HDF5 API는 solver core에 직접 노출하지 않는다.
|
||||
- Runtime Polymorphism: 요소, 재료, 하중, 경계조건은 base interface를 통해 다룬다. 대규모 모델 성능 최적화가 필요하면 assembly 내부에서 타입별 batch 처리 또는 kernel 분리를 추가한다.
|
||||
- RAII: MKL handle, HDF5 file/dataset, temporary solver workspace의 수명과 오류 처리를 wrapper에 묶는다.
|
||||
|
||||
## Sparse Matrix Policy
|
||||
- assembly는 초기에는 COO triplet 수집 후 CSR finalize를 기준으로 한다.
|
||||
- `SparseMatrix`는 solver core가 사용하는 추상 contract이고 MKL PARDISO backend는 CSR input contract만 받는다.
|
||||
- matrix symmetry, definiteness, singularity diagnostic을 구조화된 diagnostic으로 남긴다.
|
||||
- deterministic assembly를 위해 TBB element loop는 thread-local contribution buffer 또는 two-pass sparse assembly를 사용한다.
|
||||
|
||||
## Parallel Policy
|
||||
- 첫 번째 oneTBB 적용 지점은 element-local matrix/residual 계산이다.
|
||||
- 전역 sparse write는 thread-local buffer 또는 deterministic reduction으로 제한한다.
|
||||
- MKL 내부 thread와 TBB element loop가 oversubscription을 만들지 않도록 thread count와 task arena 정책을 명시한다.
|
||||
|
||||
## HDF5 Result Schema
|
||||
```text
|
||||
/metadata
|
||||
/model/nodes
|
||||
/model/elements
|
||||
/steps/<step-name>/frames/<frame-id>/nodal/displacement
|
||||
/steps/<step-name>/frames/<frame-id>/nodal/reaction
|
||||
/steps/<step-name>/frames/<frame-id>/element/stress
|
||||
/steps/<step-name>/frames/<frame-id>/element/strain
|
||||
/diagnostics
|
||||
```
|
||||
|
||||
Schema requirements:
|
||||
- schema version, units, coordinate system, solver version, source input identity를 metadata에 기록한다.
|
||||
- field output과 history output을 구분한다.
|
||||
- reference comparison을 위한 row identity는 node id, element id, integration point id, step/frame id를 포함한다.
|
||||
- HDF5가 authoritative output이며 CSV는 optional deterministic comparison view이다.
|
||||
- Solver output은 `results.h5`, stored reference output은 `reference.h5`, CSV view는 `csv/*.csv` 경로를 기본으로 한다.
|
||||
|
||||
## Test Architecture
|
||||
- unit: parser, DOF map, shape functions, material law, sparse assembly, HDF5 schema
|
||||
- integration: small `.inp` to HDF5 end-to-end
|
||||
- reference: stored Abaqus artifact comparison
|
||||
- physics: equilibrium, sign, symmetry, rigid body mode, stress sanity
|
||||
- harness: hooks, phase executor, workspace validation
|
||||
|
||||
## Hook 흐름
|
||||
```text
|
||||
apply_patch/Edit/Write
|
||||
|
||||
+86
-13
@@ -1,22 +1,95 @@
|
||||
# PRD: C++/MSVC Harness
|
||||
# PRD: FESA 구조해석 솔버
|
||||
|
||||
## 목표
|
||||
Codex Harness가 C++/MSVC 프로젝트에서 phase planning, TDD guard, commit validation, workspace validation을 일관되게 수행하게 한다.
|
||||
FESA는 Abaqus `.inp` keyword subset을 입력으로 받아 유한요소법 기반 구조해석을 수행하고, step/frame 단위 결과를 HDF5로 저장하며, 저장된 reference artifact와 비교 가능한 C++17/MSVC 솔버를 제공한다.
|
||||
|
||||
이 프로젝트의 성공 기준은 단순 실행 성공이 아니다. 기능은 요구조건, 정식화, I/O 계약, C++ 테스트, reference comparison, physics sanity, release readiness를 모두 통과해야 완료된다.
|
||||
|
||||
## 사용자
|
||||
- Windows/MSVC 기반 C++ 개발자
|
||||
- Harness phase를 작성하고 실행하는 Codex agent
|
||||
- Harness 결과를 검토하는 reviewer
|
||||
- Solver developer: C++17/MSVC/CMake/CTest 환경에서 요소, 재료, 해석 절차, solver backend를 구현한다.
|
||||
- Verification reviewer: reference artifact, tolerance, physics sanity, release readiness를 검토한다.
|
||||
- Analyst preparing Abaqus-compatible input subsets: FESA가 지원하는 제한된 `.inp` subset에 맞춰 입력 모델을 준비한다.
|
||||
- Codex agent workflow operator: project-local agent와 skill을 사용해 요구조건부터 release까지의 gate를 운영한다.
|
||||
|
||||
## 핵심 기능
|
||||
1. CMake/MSVC/x64/Debug 기반 workspace validation
|
||||
2. C++ source/header 변경에 대한 엄격한 TDD guard
|
||||
3. npm 없이 Python self-test와 CMake/CTest 검증을 수행하는 pre-commit hook
|
||||
4. C++ 프로젝트에 맞는 Harness workflow/review prompt
|
||||
5. CMake project가 아직 없어도 Harness 자체 테스트가 가능한 no-op validation path
|
||||
1. Abaqus `.inp` keyword subset parser와 내부 `Domain` semantic model 생성
|
||||
2. `AnalysisModel`, `DofManager`, `AnalysisState` 기반의 step별 equation system 구성
|
||||
3. 선형 정적 해석을 시작점으로 하는 `Analysis` procedure 계층
|
||||
4. 요소, 재료, 경계조건, 하중의 runtime-polymorphic base interface
|
||||
5. sparse matrix pattern 생성, 전역 행렬/벡터 조립, 제약조건 적용
|
||||
6. `LinearSolver` adapter를 통한 MKL PARDISO backend와 향후 iterative solver 확장
|
||||
7. HDF5 기반 `ResultStep` -> `ResultFrame` -> `FieldOutput`/`HistoryOutput` 저장
|
||||
8. HDF5 authoritative output에서 deterministic CSV comparison view 추출 또는 직접 비교
|
||||
9. CMake/MSVC/x64/Debug, CTest, Harness validation, TDD guard 기반 개발 검증
|
||||
|
||||
## V0 범위
|
||||
- 선형 정적 해석 골격
|
||||
- 첫 end-to-end 기능 후보: 1D truss/bar element
|
||||
- 최소 Abaqus keyword subset:
|
||||
- `*HEADING`
|
||||
- `*NODE`
|
||||
- `*ELEMENT`
|
||||
- `*NSET`
|
||||
- `*ELSET`
|
||||
- `*MATERIAL`
|
||||
- `*ELASTIC`
|
||||
- section keyword
|
||||
- `*BOUNDARY`
|
||||
- `*CLOAD`
|
||||
- `*STEP`
|
||||
- `*STATIC`
|
||||
- output request subset
|
||||
- displacement 중심의 최소 `AnalysisState`
|
||||
- HDF5 result schema v0
|
||||
- reference comparison용 CSV view 또는 HDF5 직접 비교 계약
|
||||
|
||||
## V1 범위
|
||||
- 2D plane stress/plane strain element
|
||||
- 3D solid element
|
||||
- MKL PARDISO 기반 sparse direct solve
|
||||
- TBB element-local computation 병렬화
|
||||
- reference model portfolio 확장
|
||||
- nonlinear static, dynamic, frequency, heat transfer 해석을 위한 interface 확장점
|
||||
|
||||
## 기능 요구조건
|
||||
| ID | 요구조건 | Acceptance Criteria | Verification Method |
|
||||
| --- | --- | --- | --- |
|
||||
| FESA-PRD-001 | FESA는 Abaqus `.inp` full compatibility가 아니라 승인된 keyword subset만 지원해야 한다. | 지원/미지원 keyword가 문서화되고, 미지원 keyword는 구조화된 diagnostic을 남긴다. | I/O contract review, parser unit test |
|
||||
| FESA-PRD-002 | FESA는 입력 모델을 `Domain`으로 변환해야 한다. | nodes, elements, materials, properties, sets, loads, boundary conditions, step definitions가 semantic model에 보존된다. | parser integration test |
|
||||
| FESA-PRD-003 | FESA는 현재 step의 실행 view를 `AnalysisModel`로 구성해야 한다. | active elements, loads, boundary conditions, properties/materials가 Domain 복사 없이 참조 또는 id view로 연결된다. | analysis model unit test |
|
||||
| FESA-PRD-004 | FESA는 equation numbering과 constraint/free mapping을 `DofManager`에 집중해야 한다. | Node/Element 내부에 equation id를 분산 저장하지 않는다. | code review, DofManager unit test |
|
||||
| FESA-PRD-005 | FESA는 해석 중 변하는 물리량을 `AnalysisState`에 저장해야 한다. | displacement, force, residual, increment/iteration 상태가 step/frame 출력과 연결된다. | state unit test, integration test |
|
||||
| FESA-PRD-006 | FESA는 solver 결과를 HDF5 authoritative output으로 저장해야 한다. | step/frame, field/history, metadata, diagnostics가 schema version과 함께 저장된다. | HDF5 schema test |
|
||||
| FESA-PRD-007 | FESA는 reference artifact와 비교 가능한 deterministic result view를 제공해야 한다. | displacement, reaction, element force, stress 등 검증 물리량의 row identity와 tolerance source가 명확하다. | reference comparison report |
|
||||
| FESA-PRD-008 | FESA의 production C++ 변경은 테스트를 먼저 작성하고 실패를 확인한 뒤 구현해야 한다. | 관련 C++ test file이 있고 Harness TDD guard를 통과한다. | hook test, CTest |
|
||||
| FESA-PRD-009 | FESA는 외부 라이브러리 API를 solver core에 직접 노출하지 않아야 한다. | MKL, TBB, HDF5 의존은 adapter module에 제한된다. | architecture review, dependency review |
|
||||
| FESA-PRD-010 | FESA 기능 완료는 reference comparison과 physics sanity 통과를 요구해야 한다. | 수치 tolerance와 물리 검토가 모두 pass이고 known limitation이 기록된다. | verification report, physics evaluation report |
|
||||
|
||||
## 비기능 요구조건
|
||||
- MSVC x64 Debug 환경에서 configure, build, CTest를 검증한다.
|
||||
- reference test 결과는 deterministic해야 한다.
|
||||
- HDF5 schema는 versioned contract로 관리한다.
|
||||
- tolerance policy는 absolute, relative, norm-based 기준을 구분한다.
|
||||
- parser, solver, HDF5 writer는 실패 원인을 구조화된 diagnostic으로 보고한다.
|
||||
- oneMKL, oneTBB, HDF5는 CMake에서 명시 탐지하고 실패 원인을 분류한다.
|
||||
- 대규모 모델 성능 최적화보다 Phase 1 명확성, 테스트 가능성, 검증 traceability를 우선한다.
|
||||
|
||||
## Acceptance Gates
|
||||
1. Requirements approved: 기능 범위, 제외 범위, 입력, 출력, tolerance, 검증 물리량이 정의되어 있다.
|
||||
2. Research evidence complete: 정식화와 benchmark 근거가 신뢰도와 한계와 함께 정리되어 있다.
|
||||
3. Formulation reviewed: 약형, shape function, B matrix, constitutive contract, 수치적분, output recovery가 검토되어 있다.
|
||||
4. I/O contract approved: Abaqus keyword subset, internal model mapping, HDF5/CSV result contract가 승인되어 있다.
|
||||
5. Tests fail before implementation: 구현 전 실패해야 하는 C++/integration/reference test가 준비되어 있다.
|
||||
6. CMake/CTest pass: MSVC/x64/Debug 기준 configure, build, test가 통과한다.
|
||||
7. Reference comparison pass: 저장된 reference artifact와 구현 결과가 tolerance 안에 있다.
|
||||
8. Physics sanity pass: equilibrium, reaction consistency, displacement direction, symmetry, stress sanity가 검토되어 있다.
|
||||
9. Release readiness pass: acceptance traceability, known limitations, release notes draft가 준비되어 있다.
|
||||
|
||||
## 제외 사항
|
||||
- 이전 FESA solver source tree 복원
|
||||
- JavaScript/TypeScript fallback 유지
|
||||
- Abaqus reference artifact 생성 또는 solver reference 비교 구현
|
||||
- Abaqus full parser 호환
|
||||
- Abaqus, Nastran 또는 reference solver 직접 실행 자동화
|
||||
- Agent가 reference HDF5 artifact 또는 deterministic CSV view를 임의 생성 또는 수정하는 작업
|
||||
- GUI 또는 postprocessor
|
||||
- Visual Studio `.sln`/`.vcxproj` 전용 MSBuild workflow
|
||||
- Explicit dynamics, contact, plasticity, shell end-to-end 구현
|
||||
- JavaScript/TypeScript fallback 유지
|
||||
|
||||
+209
-12
@@ -105,7 +105,9 @@ references/
|
||||
<model-id>/
|
||||
model.inp
|
||||
metadata.json
|
||||
expected.h5 or reference CSV views
|
||||
reference.h5
|
||||
csv/
|
||||
deterministic comparison views
|
||||
```
|
||||
|
||||
### 모듈 경계 원칙
|
||||
@@ -118,16 +120,210 @@ references/
|
||||
- `analysis`는 step/history data를 받아 procedure를 실행하고, solver backend와 result writer를 조율한다.
|
||||
- `results`는 HDF5 schema를 통해 nodal, element, integration-point, diagnostic output을 분리한다.
|
||||
|
||||
## 핵심 클래스 구조 후보
|
||||
아래 구조는 `docs/ARCHITECTURE.md`에 반영할 개념적 class map이다. `1DElement`, `2DElement`, `3DElement` 같은 이름은 분류 표현이며, 실제 C++ 식별자는 `Element1D`처럼 유효한 이름으로 확정한다.
|
||||
|
||||
```text
|
||||
Domain
|
||||
├── Node
|
||||
├── Element
|
||||
├── Material
|
||||
├── Property
|
||||
├── NodeSet
|
||||
├── ElementSet
|
||||
├── BoundaryCondition
|
||||
├── Load
|
||||
└── StepDefinition
|
||||
|
||||
AnalysisModel
|
||||
├── active elements
|
||||
├── active loads
|
||||
├── active boundary conditions
|
||||
├── active properties/materials
|
||||
└── equation system view
|
||||
|
||||
AnalysisState
|
||||
├── displacement U
|
||||
├── velocity V
|
||||
├── acceleration A
|
||||
├── temperature T
|
||||
├── external force Fext
|
||||
├── internal force Fint
|
||||
├── residual R
|
||||
├── current time / increment / iteration
|
||||
└── element state / integration point state
|
||||
|
||||
DofManager
|
||||
├── node dof definitions
|
||||
├── constrained/free dof mapping
|
||||
├── equation numbering
|
||||
├── sparse matrix pattern ownership
|
||||
└── full/reduced vector reconstruction
|
||||
|
||||
Analysis
|
||||
├── LinearStaticAnalysis
|
||||
├── NonlinearStaticAnalysis
|
||||
├── DynamicAnalysis
|
||||
├── FrequencyAnalysis
|
||||
└── HeatTransferAnalysis
|
||||
|
||||
Element
|
||||
├── 1DElement
|
||||
│ ├── Truss
|
||||
│ └── Beam
|
||||
├── 2DElement
|
||||
│ ├── MITC3
|
||||
│ └── MITC4
|
||||
└── 3DElement
|
||||
├── Hexahedral
|
||||
├── Tetrahedral
|
||||
├── Wedge
|
||||
└── Pyramid
|
||||
|
||||
BoundaryCondition
|
||||
├── Fix
|
||||
├── RBE2
|
||||
└── RBE3
|
||||
|
||||
Load
|
||||
├── NodalLoad
|
||||
├── PressureLoad
|
||||
└── BodyForce
|
||||
|
||||
Results
|
||||
├── ResultStep
|
||||
├── ResultFrame
|
||||
├── FieldOutput
|
||||
└── HistoryOutput
|
||||
|
||||
InputParser
|
||||
ResultsWriter
|
||||
Assembler
|
||||
LinearSolver
|
||||
Vector
|
||||
Matrix
|
||||
SparseMatrix
|
||||
```
|
||||
|
||||
문서화 시 핵심 책임은 다음처럼 구분한다.
|
||||
- `Domain`은 입력 파일에서 생성된 전체 모델 정의를 소유한다.
|
||||
- `AnalysisModel`은 현재 step에서 활성화된 해석 객체 view를 제공한다.
|
||||
- `DofManager`는 자유도 정의, 제약/free mapping, equation numbering, sparse pattern ownership을 전담한다.
|
||||
- `AnalysisState`는 해석 중 변하는 물리량과 반복 상태를 소유한다.
|
||||
- `Analysis` 계층은 procedure별 실행 전략을 제공한다.
|
||||
- `Element`, `Material`, `Load`, `BoundaryCondition`은 base interface를 통해 다루되, Phase 1에서는 명확성과 테스트 가능성을 성능 최적화보다 우선한다.
|
||||
|
||||
## 권장 설계 패턴
|
||||
- Strategy: linear solver backend, nonlinear convergence policy, constraint handling, time integration, output backend를 교체 가능한 전략으로 둔다.
|
||||
- Factory/Registry: Abaqus keyword, element type, material type을 내부 semantic object로 생성한다. 초기에는 compile-time/static registry로 충분하며 동적 plugin은 문서 범위에서 제외한다.
|
||||
- Template Method: element routine은 `gather state -> evaluate quadrature -> accumulate local matrix/vector -> recover output` 순서를 공유하되 요소별 shape function과 constitutive contract를 분리한다.
|
||||
- Adapter: MKL PARDISO, oneTBB, HDF5, Abaqus syntax를 내부 core API에서 직접 노출하지 않는다.
|
||||
- Strategy Pattern: 해석 알고리즘과 수치 알고리즘을 교체 가능하게 구성한다.
|
||||
- `Analysis`: `LinearStaticAnalysis`, `NonlinearStaticAnalysis`, `DynamicAnalysis`, `HeatTransferAnalysis`
|
||||
- `LinearSolver`: `MKLPardisoSolver`, 향후 iterative solver
|
||||
- `TimeIntegrator`: `HHTIntegrator`, 향후 Newmark 등
|
||||
- `ConvergenceCriteria`: residual norm, displacement norm, energy norm
|
||||
- Template Method Pattern: 해석 실행의 큰 흐름은 `Analysis::run()`에서 고정하고, 세부 단계는 해석 종류별로 재정의한다.
|
||||
```text
|
||||
initialize
|
||||
buildAnalysisModel
|
||||
buildDofMap
|
||||
buildSparsePattern
|
||||
assemble
|
||||
applyBoundaryConditions
|
||||
solve
|
||||
updateState
|
||||
writeResults
|
||||
```
|
||||
비선형 정적해석은 위 흐름을 Newton-Raphson 반복 루프 안에서 사용하고, 동적해석은 time step/frame 루프 안에서 사용한다.
|
||||
- Factory + Registry Pattern: Abaqus input keyword와 내부 객체 생성을 분리한다.
|
||||
- `*Element, type=S4` -> `MITC4ElementFactory`
|
||||
- `*Material`, `*Elastic` -> `LinearElasticMaterialFactory`
|
||||
- `*Boundary` -> `FixBoundaryFactory`
|
||||
- `*Cload` -> `NodalLoadFactory`
|
||||
- `*Nset`, `*Elset` -> set registry
|
||||
요소, 재료, 하중, 경계조건 타입 추가 시 parser 본체의 변경을 최소화한다.
|
||||
- Adapter Pattern: MKL, TBB, HDF5 API는 solver core에 직접 노출하지 않는다.
|
||||
- `SparseMatrix`, `Vector`, `Matrix`
|
||||
- `LinearSolver`
|
||||
- `ParallelFor`
|
||||
- `ResultsWriter`
|
||||
외부 라이브러리 교체 또는 테스트 double 사용이 가능하도록 adapter 계층에서 의존성을 제한한다.
|
||||
- Runtime Polymorphism: 요소, 재료, 하중, 경계조건은 base interface를 통해 다룬다. Phase 1에서는 명확성과 테스트 가능성을 우선하고, 대규모 모델 성능 최적화가 필요할 경우 assembly 내부에서 타입별 batch 처리 또는 kernel 분리를 추가한다.
|
||||
- RAII: MKL handle, HDF5 file/dataset, temporary solver workspace는 수명과 오류 처리를 wrapper에 묶는다.
|
||||
- Data-oriented core: global vectors, sparse matrix arrays, DOF maps, element connectivity는 cache locality와 deterministic assembly를 우선한다.
|
||||
- Deterministic assembly: TBB element loop는 thread-local contribution buffer 또는 two-pass sparse assembly를 사용해 reference comparison의 재현성을 해치지 않도록 한다.
|
||||
- Explicit diagnostics: parser warning, unsupported keyword, singular matrix, rigid body mode, convergence failure, HDF5 schema mismatch를 구조화된 diagnostic으로 남긴다.
|
||||
|
||||
## 상태 관리 모델
|
||||
|
||||
### 1. `Domain`
|
||||
`Domain`은 입력 파일에서 만들어진 전체 모델 정의를 소유한다. 파싱 이후에는 가능한 한 불변으로 취급한다.
|
||||
|
||||
포함 대상:
|
||||
- nodes, elements
|
||||
- materials, properties
|
||||
- node sets, element sets
|
||||
- loads, boundary conditions
|
||||
- analysis step definitions
|
||||
|
||||
### 2. `AnalysisModel`
|
||||
`AnalysisModel`은 현재 step에서 활성화되는 해석 객체들의 실행 view이다. `Domain`을 복사하지 않고 참조 또는 id 기반 view로 구성한다.
|
||||
|
||||
포함 대상:
|
||||
- active elements
|
||||
- active loads
|
||||
- active boundary conditions
|
||||
- active property/material references
|
||||
- current equation system view
|
||||
|
||||
### 3. `DofManager`
|
||||
`DofManager`는 자유도와 방정식 번호를 전담한다. `Node` 또는 `Element` 내부에 equation id를 분산 저장하지 않는다.
|
||||
|
||||
책임:
|
||||
- node별 활성 자유도 정의
|
||||
- constrained/free dof mapping
|
||||
- equation numbering
|
||||
- sparse matrix pattern 생성에 필요한 connectivity 제공
|
||||
- 경계조건 적용 전후의 dof view 관리
|
||||
- full/reduced vector reconstruction
|
||||
|
||||
### 4. `AnalysisState`
|
||||
`AnalysisState`는 해석 중 변하는 물리량과 반복 상태를 소유한다.
|
||||
|
||||
포함 대상:
|
||||
- displacement, velocity, acceleration
|
||||
- temperature
|
||||
- external force, internal force, residual
|
||||
- current time, increment, Newton iteration
|
||||
- element state, integration point state
|
||||
|
||||
Phase 1에서는 displacement 중심으로 최소 구현하되, 기하비선형과 thermal-stress coupling을 위해 element/internal state 확장 지점을 유지한다.
|
||||
|
||||
### 5. Results State
|
||||
결과는 `ResultStep` -> `ResultFrame` -> `FieldOutput`/`HistoryOutput` 구조로 관리한다.
|
||||
|
||||
- `ResultStep`: 해석 step 단위 결과
|
||||
- `ResultFrame`: 정적해석의 load increment 또는 동적해석의 time frame
|
||||
- `FieldOutput`: node/element field 결과
|
||||
- `HistoryOutput`: 특정 node, element, set, reaction, energy 등의 이력 결과
|
||||
|
||||
## 권장 데이터 흐름
|
||||
`docs/ARCHITECTURE.md`에는 아래 흐름을 solver 실행의 표준 경로로 반영한다.
|
||||
|
||||
```text
|
||||
Abaqus input file
|
||||
-> InputParser
|
||||
-> Domain 생성
|
||||
-> StepDefinition 루프
|
||||
-> AnalysisModel 생성
|
||||
-> DofManager로 자유도/방정식 번호 생성
|
||||
-> sparse pattern 생성
|
||||
-> Analysis 실행
|
||||
-> Assembler로 전역 행렬/벡터 조립
|
||||
-> BoundaryCondition 적용
|
||||
-> LinearSolver 또는 nonlinear/time integration loop
|
||||
-> AnalysisState 갱신
|
||||
-> ResultsWriter로 step/frame/history 저장
|
||||
-> 다음 step 진행
|
||||
```
|
||||
|
||||
## 세 문서별 완성 계획
|
||||
|
||||
### 1. `AGENTS.md`
|
||||
@@ -294,14 +490,15 @@ references/
|
||||
| 물리 검토 | `physics-evaluation-agent` | `fesa-physics-sanity` | `docs/physics-evaluations/<feature-id>-physics-evaluation.md` |
|
||||
| 배포 준비 | `release-agent` | `fesa-release-readiness` | `docs/releases/<feature-id>-release.md` |
|
||||
|
||||
## HDF5와 기존 CSV reference skill의 정합성 이슈
|
||||
현재 프로젝트 문서와 skill은 reference comparison artifact로 CSV를 많이 언급한다. 사용자 요구조건은 solver 결과 저장 포맷을 HDF5로 지정한다.
|
||||
## HDF5와 deterministic CSV view 정합성 결정
|
||||
프로젝트 문서와 skill의 reference comparison 경로는 HDF5 authoritative output과 deterministic CSV view 구조를 기준으로 정리한다.
|
||||
|
||||
권장 결정:
|
||||
결정:
|
||||
- FESA solver의 정식 결과 파일은 HDF5로 한다.
|
||||
- reference comparison을 위해 HDF5 dataset에서 deterministic CSV view를 추출하거나, comparison tool이 HDF5와 reference CSV를 직접 비교하도록 한다.
|
||||
- `docs/PRD.md`와 `docs/ARCHITECTURE.md`에는 "HDF5 authoritative output, CSV comparison view optional"을 명시한다.
|
||||
- 기존 `fesa-reference-comparison` skill은 즉시 바꾸기보다, 문서에서 HDF5 support extension을 후속 작업으로 기록한다.
|
||||
- solver output은 `results.h5`, stored reference output은 `reference.h5`를 authoritative artifact로 둔다.
|
||||
- reference comparison을 위해 HDF5 dataset에서 `csv/displacements.csv`, `csv/reactions.csv`, `csv/element_forces.csv`, `csv/stresses.csv` 같은 deterministic CSV view를 추출할 수 있다.
|
||||
- CSV view는 row identity와 사람이 검토 가능한 비교 view일 뿐이며 authoritative storage가 아니다.
|
||||
- `fesa-reference-comparison`, `fesa-io-contract`, `fesa-reference-models`, 관련 agent 문서는 이 구조를 기준으로 유지한다.
|
||||
|
||||
## 주요 리스크와 열린 질문
|
||||
- 첫 end-to-end feature를 1D truss/bar로 확정할지, 2D plane stress까지 포함할지 결정이 필요하다. 문서 계획상 v0는 1D truss/bar가 가장 안전하다.
|
||||
@@ -335,5 +532,5 @@ references/
|
||||
- HDF5 result schema ADR 작성.
|
||||
- Abaqus `.inp` v0 keyword subset ADR 작성.
|
||||
- MKL/TBB threading policy ADR 작성.
|
||||
- `fesa-reference-comparison` skill의 HDF5 comparison 확장 계획 작성.
|
||||
- HDF5 result schema와 deterministic CSV view exporter의 구체 schema/test 작성.
|
||||
- 첫 기능 `linear-truss-1d`의 `docs/requirements/linear-truss-1d.md` 작성.
|
||||
|
||||
+17
-12
@@ -9,7 +9,7 @@
|
||||
- 기능 요구조건, 이론 정식화, 코드 구현, 검증, 배포 역할을 분리한다.
|
||||
- 실행 가능성만으로 성공을 판단하지 않고, 레퍼런스 결과와 물리량을 비교해 기능 완료를 판정한다.
|
||||
- 테스트는 구현 전에 준비한다. 개발 대상 솔버 테스트와 레퍼런스 솔버 결과 비교 테스트를 함께 사용한다.
|
||||
- Abaqus나 Nastran을 Agent가 직접 실행하지 않는다. `references/`에 저장된 입력 파일과 레퍼런스 CSV 결과를 검증 기준으로 사용한다.
|
||||
- Abaqus나 Nastran을 Agent가 직접 실행하지 않는다. `references/`에 저장된 입력 파일, `reference.h5`, deterministic CSV views를 검증 기준으로 사용한다.
|
||||
- 기본 개발 환경은 C++17 이상, MSVC, CMake, CTest이다.
|
||||
- 모든 기능은 tolerance 기준을 명시하고, 기준을 만족할 때만 배포 후보가 된다.
|
||||
|
||||
@@ -98,14 +98,15 @@
|
||||
|
||||
책임:
|
||||
- mesh, node, element, material, section, boundary condition, load, step 입력 형식을 정의한다.
|
||||
- 출력 CSV 또는 result file schema를 정의한다.
|
||||
- authoritative HDF5 result schema와 deterministic CSV view schema를 정의한다.
|
||||
- Abaqus input file과 내부 입력 모델 사이의 대응 관계를 정리한다.
|
||||
- 결과 비교를 위해 레퍼런스 CSV와 구현 솔버 출력의 컬럼 규약을 맞춘다.
|
||||
- 결과 비교를 위해 reference HDF5 dataset, solver HDF5 dataset, deterministic CSV view의 ID/컴포넌트 규약을 맞춘다.
|
||||
|
||||
주요 산출물:
|
||||
- 입력 데이터 schema
|
||||
- 출력 데이터 schema
|
||||
- 결과 비교용 CSV schema
|
||||
- HDF5 result schema
|
||||
- 결과 비교용 deterministic CSV view schema
|
||||
- 단위와 좌표계 규약
|
||||
|
||||
### Reference Model Agent
|
||||
@@ -113,7 +114,7 @@ TDD와 검증에 사용할 테스트 모델을 준비하는 Agent이다.
|
||||
|
||||
책임:
|
||||
- 개발 대상 기능을 검증할 최소 모델, benchmark 모델, 회귀 모델을 설계한다.
|
||||
- `references/`에 보관할 Abaqus input file과 Abaqus 결과 CSV 요구사항을 정의한다.
|
||||
- `references/`에 보관할 Abaqus input file, `reference.h5`, deterministic CSV view 요구사항을 정의한다.
|
||||
- 레퍼런스 결과에 포함될 물리량과 tolerance를 명시한다.
|
||||
- 테스트 모델이 요구조건을 실제로 검증하는지 확인한다.
|
||||
|
||||
@@ -128,10 +129,12 @@ references/
|
||||
<feature-name>/
|
||||
model.inp
|
||||
metadata.json
|
||||
displacements.csv
|
||||
reactions.csv
|
||||
element_forces.csv
|
||||
stresses.csv
|
||||
reference.h5
|
||||
csv/
|
||||
displacements.csv
|
||||
reactions.csv
|
||||
element_forces.csv
|
||||
stresses.csv
|
||||
```
|
||||
|
||||
### Implementation Planning Agent
|
||||
@@ -200,7 +203,7 @@ python scripts/validate_workspace.py
|
||||
구현 솔버 결과와 저장된 레퍼런스 결과를 비교하는 Agent이다.
|
||||
|
||||
책임:
|
||||
- 구현 솔버 결과 CSV와 `references/`의 Abaqus CSV를 비교한다.
|
||||
- 구현 솔버 `results.h5`와 `references/`의 `reference.h5`를 비교하고, deterministic CSV views를 row identity 검토와 report evidence로 사용한다.
|
||||
- 절점 변위, 반력, 요소 내력, 응력의 tolerance 만족 여부를 평가한다.
|
||||
- absolute tolerance, relative tolerance, norm-based tolerance를 구분해 적용한다.
|
||||
- 결과 차이가 tolerance 밖이면 원인 후보를 분류한다.
|
||||
@@ -304,7 +307,7 @@ flowchart TD
|
||||
|
||||
### Gate 5: 레퍼런스 검증
|
||||
통과 조건:
|
||||
- 저장된 Abaqus CSV 결과와 구현 솔버 결과가 tolerance 안에 있다.
|
||||
- 저장된 reference HDF5 결과와 구현 solver HDF5 결과가 tolerance 안에 있다.
|
||||
- 절점 변위, 반력, 요소 내력, 응력 비교 결과가 리포트로 남아 있다.
|
||||
- 실패한 물리량이 없거나 승인된 known limitation으로 기록되어 있다.
|
||||
|
||||
@@ -314,9 +317,11 @@ flowchart TD
|
||||
- 문서와 release note가 준비되어 있다.
|
||||
- 남은 제한사항이 명확히 기록되어 있다.
|
||||
|
||||
## Reference CSV 비교 기준
|
||||
## Reference HDF5 / CSV View 비교 기준
|
||||
|
||||
권장 비교 방식:
|
||||
- authoritative 비교는 `results.h5`와 `reference.h5`의 dataset 기준으로 수행한다.
|
||||
- CSV는 HDF5 dataset에서 추출한 deterministic view로만 사용한다.
|
||||
- scalar 값: absolute tolerance와 relative tolerance를 함께 적용한다.
|
||||
- vector 값: component-wise 비교와 norm 비교를 함께 기록한다.
|
||||
- stress tensor: component-wise 비교를 기본으로 하고, 필요한 경우 principal stress 또는 von Mises stress를 추가 비교한다.
|
||||
|
||||
@@ -13,7 +13,7 @@ Agent는 역할과 책임 단위이고, skill은 여러 Agent가 반복적으로
|
||||
- Skill 본문은 agent TOML의 역할 설명을 반복하지 않고, 입력, 절차, 산출물, 금지사항, 품질 gate, handoff를 정의한다.
|
||||
- Skill은 `AGENTS.md`와 `docs/SOLVER_AGENT_DESIGN.md`를 공통 상위 기준으로 읽는다.
|
||||
- Abaqus, Nastran 또는 reference solver 실행은 skill 범위에 포함하지 않는다.
|
||||
- Reference CSV 생성 또는 수정은 skill 범위에 포함하지 않는다.
|
||||
- Reference HDF5 파일 또는 deterministic CSV view 생성/수정은 skill 범위에 포함하지 않는다.
|
||||
- C++ 구현 관련 skill은 C++17 이상, MSVC, CMake, CTest, TDD 원칙을 따른다.
|
||||
- 기본 workspace validation 명령은 `python scripts/validate_workspace.py`이다.
|
||||
|
||||
@@ -40,10 +40,10 @@ Agent는 역할과 책임 단위이고, skill은 여러 Agent가 반복적으로
|
||||
2. Research Agent는 `fesa-research-evidence`를 사용해 truss/bar element 이론, benchmark 후보, source reliability, applicability limits를 정리한다.
|
||||
3. Formulation Agent는 `fesa-formulation-spec`을 사용해 strong form, weak form, shape functions, B matrix, element stiffness, output recovery를 정리한다.
|
||||
4. Numerical Review Agent는 `fesa-numerical-review`를 사용해 rigid body modes, patch test, stiffness symmetry, Jacobian, locking 위험을 검토하고 `pass-for-implementation-planning` 여부를 판단한다.
|
||||
5. I/O Definition Agent는 `fesa-io-contract`를 사용해 지원할 Abaqus `.inp` keyword subset과 `displacements.csv`, `reactions.csv`, `element_forces.csv`, `stresses.csv` schema를 정의한다.
|
||||
5. I/O Definition Agent는 `fesa-io-contract`를 사용해 지원할 Abaqus `.inp` keyword subset, `results.h5` schema, `csv/displacements.csv`, `csv/reactions.csv`, `csv/element_forces.csv`, `csv/stresses.csv` view schema를 정의한다.
|
||||
6. Reference Model Agent는 `fesa-reference-models`를 사용해 `references/linear-truss-1d/<model-id>/` artifact bundle 계약과 coverage matrix를 작성한다.
|
||||
7. Implementation Planning Agent와 Implementation Agent는 `fesa-cpp-msvc-tdd`를 사용해 테스트 작성, 실패 확인, 최소 구현, CMake/CTest 등록, validation을 수행한다.
|
||||
8. Reference Verification Agent는 `fesa-reference-comparison`을 사용해 구현 solver CSV와 저장된 reference CSV를 tolerance 기준으로 비교한다.
|
||||
8. Reference Verification Agent는 `fesa-reference-comparison`을 사용해 구현 solver `results.h5`와 저장된 `reference.h5`를 tolerance 기준으로 비교하고 deterministic CSV view를 검토한다.
|
||||
9. Physics Evaluation Agent는 `fesa-physics-sanity`를 사용해 global equilibrium, reaction consistency, displacement direction, symmetry, model coverage를 검토한다.
|
||||
10. Release Agent는 `fesa-release-readiness`를 사용해 gate evidence, acceptance traceability, known limitations, release notes draft를 작성한다.
|
||||
|
||||
@@ -54,7 +54,7 @@ Agent는 역할과 책임 단위이고, skill은 여러 Agent가 반복적으로
|
||||
- 기능 요청을 검증 가능한 요구조건 baseline으로 만든다.
|
||||
- `shall` 문장과 `FESA-REQ-<FEATURE>-###` id를 사용한다.
|
||||
- 모든 `must` 요구조건은 verification method와 acceptance criteria를 가져야 한다.
|
||||
- FEM 정식화, C++ 구현, reference CSV 생성, release readiness 판단은 하지 않는다.
|
||||
- FEM 정식화, C++ 구현, reference HDF5/CSV view 생성, release readiness 판단은 하지 않는다.
|
||||
|
||||
### `fesa-research-evidence`
|
||||
|
||||
@@ -81,15 +81,15 @@ Agent는 역할과 책임 단위이고, skill은 여러 Agent가 반복적으로
|
||||
|
||||
- FESA solver input이 지원할 Abaqus `.inp` subset을 정의한다.
|
||||
- model data와 history data를 구분한다.
|
||||
- 내부 semantic model 계약과 output/CSV schema를 정의한다.
|
||||
- 내부 semantic model 계약, HDF5 output schema, deterministic CSV view schema를 정의한다.
|
||||
- parser 구현이나 full Abaqus compatibility claim은 하지 않는다.
|
||||
|
||||
### `fesa-reference-models`
|
||||
|
||||
- smoke, analytical, patch test, benchmark, regression, negative/invalid-input 모델을 구분한다.
|
||||
- `references/<feature-id>/<model-id>/` artifact bundle 계약을 정의한다.
|
||||
- `model.inp`, `metadata.json`, `displacements.csv`, `reactions.csv`, `element_forces.csv`, `stresses.csv`를 기준 artifact로 둔다.
|
||||
- Reference CSV가 없으면 완료 상태가 아니라 `needs-reference-artifacts`로 둔다.
|
||||
- `model.inp`, `metadata.json`, `reference.h5`, `csv/displacements.csv`, `csv/reactions.csv`, `csv/element_forces.csv`, `csv/stresses.csv`를 기준 artifact로 둔다.
|
||||
- `reference.h5` 또는 required deterministic CSV view가 없으면 완료 상태가 아니라 `needs-reference-artifacts`로 둔다.
|
||||
|
||||
### `fesa-cpp-msvc-tdd`
|
||||
|
||||
@@ -109,7 +109,7 @@ ctest -C Debug -R <feature-or-label>
|
||||
### `fesa-reference-comparison`
|
||||
|
||||
- `ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT` 순서로 수행한다.
|
||||
- `metadata.json`, schema version, units, coordinate system, step/frame identity, ID matching, output location, tolerance source를 확인한다.
|
||||
- `metadata.json`, `results.h5`, `reference.h5`, deterministic CSV views, schema version, units, coordinate system, step/frame identity, ID matching, output location, tolerance source를 확인한다.
|
||||
- max absolute error, max relative error, RMS error, norm error, missing rows, extra rows를 보고한다.
|
||||
- Reference pass는 physics validation이나 release readiness를 의미하지 않는다.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Build/Test Executor Agent는 Implementation Agent 이후 독립적으로 C++/MSV
|
||||
- CMake files를 수정하지 않는다.
|
||||
- requirements, formulations, I/O contracts, reference artifacts, tolerance policies를 수정하지 않는다.
|
||||
- Abaqus, Nastran 또는 reference solver를 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- release readiness, reference tolerance success, physics validation success를 승인하지 않는다.
|
||||
- 최종 reference verification report를 작성하지 않는다.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Coordinator Agent는 FESA solver 기능 개발의 전체 lifecycle에서 gate ev
|
||||
- requirements, formulations, I/O contracts, numerical review reports를 수정하지 않는다.
|
||||
- reference artifacts 또는 tolerance policies를 수정하지 않는다.
|
||||
- Abaqus, Nastran 또는 reference solver를 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- subagents를 자동 spawn하지 않는다.
|
||||
- release readiness를 독립적으로 승인하지 않는다.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Correction Agent는 Build/Test Executor Agent, Reference Verification Agent, Phy
|
||||
- reference artifacts를 수정하지 않는다.
|
||||
- tolerance policies를 수정하지 않는다.
|
||||
- Abaqus, Nastran 또는 reference solver를 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- release readiness, reference tolerance success, physics validation success를 승인하지 않는다.
|
||||
- 최종 reference verification report 또는 physics validation report를 작성하지 않는다.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Formulation Agent는 구현 가능한 FEM 정식화 문서를 작성한다.
|
||||
- C++ 코드를 구현하지 않는다.
|
||||
- C++ API나 파일 구조를 설계하지 않는다.
|
||||
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
|
||||
- reference CSV 결과를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- release readiness를 승인하지 않는다.
|
||||
- Numerical Review Agent 검토 전 정식화를 최종 승인하지 않는다.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
이 디렉터리는 Implementation Planning Agent가 작성하거나 제안한 기능별 구현계획 문서를 보관하는 위치다.
|
||||
|
||||
Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정식화, 수치 리뷰, I/O 정의, reference model 계약을 C++/MSVC 구현 전 TDD 작업계획으로 변환한다. Agent는 코드, 테스트, CMake 파일을 작성하지 않고, Abaqus/Nastran을 실행하지 않으며, reference CSV 생성이나 solver 결과 비교, release readiness 승인도 하지 않는다.
|
||||
Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정식화, 수치 리뷰, I/O 정의, reference model 계약을 C++/MSVC 구현 전 TDD 작업계획으로 변환한다. Agent는 코드, 테스트, CMake 파일을 작성하지 않고, Abaqus/Nastran을 실행하지 않으며, reference HDF5/CSV view 생성이나 solver 결과 비교, release readiness 승인도 하지 않는다.
|
||||
|
||||
기본 파일명은 `docs/implementation-plans/<feature-id>-implementation-plan.md` 형식을 사용한다. 각 문서는 Implementation Agent가 먼저 작성해야 할 실패 테스트, 최소 구현 순서, CMake/CTest 등록 계획, acceptance traceability를 제공해야 한다.
|
||||
|
||||
@@ -23,7 +23,7 @@ Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정
|
||||
- CMake 파일을 수정하지 않는다.
|
||||
- CMake/CTest를 실행하지 않는다.
|
||||
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- solver 결과를 비교하지 않는다.
|
||||
- release readiness를 승인하지 않는다.
|
||||
- C++ API, class name, storage layout, file ownership을 확정하지 않는다.
|
||||
@@ -73,7 +73,7 @@ Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정
|
||||
| TEST-001 | 1 | unit | test fails because behavior is missing | test passes after minimal implementation | TASK-001 | ctest -C Debug -R <test-name> |
|
||||
| TEST-002 | 2 | integration | integrated path fails before implementation | integrated path passes | TASK-002 | ctest -C Debug -R <test-name> |
|
||||
| TEST-003 | 3 | parser/I/O | Abaqus .inp case is not accepted or mapped | input maps to expected semantic model | TASK-003 | ctest -C Debug -R <test-name> |
|
||||
| TEST-004 | 4 | reference-comparison | solver CSV comparison fails before implementation | comparison is within planned tolerance | TASK-004 | ctest -C Debug -R <test-name> |
|
||||
| TEST-004 | 4 | reference-comparison | solver HDF5/CSV view comparison fails before implementation | comparison is within planned tolerance | TASK-004 | ctest -C Debug -R <test-name> |
|
||||
|
||||
## CMake/CTest Plan
|
||||
- target_candidates: <library/test executable targets>
|
||||
@@ -95,8 +95,9 @@ Implementation Planning Agent는 승인된 요구조건, 연구 브리프, 정
|
||||
## Data Flow Contract
|
||||
1. Abaqus `.inp` input follows docs/io-definitions/<feature-id>-io.md.
|
||||
2. Parser/I/O path maps model data and history data into the internal semantic model.
|
||||
3. Solver path produces displacement, reaction, element force, stress, or feature-specific result CSV.
|
||||
4. Reference comparison tests compare solver CSV against `references/<feature-id>/<model-id>/` artifacts.
|
||||
3. Solver path produces authoritative `results.h5` with displacement, reaction, element force, stress, or feature-specific result datasets.
|
||||
4. Deterministic CSV views are exported from HDF5 only when the I/O contract or comparison command requires them.
|
||||
5. Reference comparison tests compare solver `results.h5` and CSV views against `references/<feature-id>/<model-id>/` artifacts.
|
||||
|
||||
## Acceptance Traceability Matrix
|
||||
|
||||
@@ -123,7 +124,7 @@ ctest -C Debug -R <feature-or-label>
|
||||
- <likely failure classifications and upstream rollback guidance>
|
||||
|
||||
### Reference Verification Agent
|
||||
- <planned CSV comparison tests, reference model ids, tolerance mapping, ID matching assumptions>
|
||||
- <planned HDF5/CSV view comparison tests, reference model ids, tolerance mapping, ID matching assumptions>
|
||||
|
||||
## Open Issues
|
||||
- <requirement, formulation, I/O, reference artifact, tolerance, or architecture issue>
|
||||
@@ -133,7 +134,7 @@ ctest -C Debug -R <feature-or-label>
|
||||
|
||||
- 모든 `must` requirement는 최소 하나의 task와 test에 연결되어야 한다.
|
||||
- C++ production 변경마다 선행 테스트 파일 또는 테스트 추가 계획이 있어야 한다.
|
||||
- reference artifact가 필요한 기능은 `references/<feature-id>/<model-id>/`와 CSV 비교 테스트 계획을 가져야 한다.
|
||||
- reference artifact가 필요한 기능은 `references/<feature-id>/<model-id>/`와 HDF5/CSV view 비교 테스트 계획을 가져야 한다.
|
||||
- CMake/CTest 계획은 MSVC x64 Debug 검증 경로와 호환되어야 한다.
|
||||
- 구현 계획은 테스트 작성, 실패 확인, 최소 구현, validation 순서를 명시해야 한다.
|
||||
- upstream 문서가 불완전하면 값을 임의로 채우지 않고 `needs-upstream-decision` 또는 `blocked`로 표시한다.
|
||||
|
||||
@@ -4,24 +4,25 @@
|
||||
|
||||
FESA 솔버의 입력 파일은 Abaqus input file이다. 다만 초기 FESA는 Abaqus 전체 문법 호환을 목표로 하지 않고, 기능별로 지원할 Abaqus keyword subset과 내부 모델 매핑을 명확히 정의한다.
|
||||
|
||||
기본 파일명은 `docs/io-definitions/<feature-id>-io.md` 형식을 사용한다. 각 문서는 Requirement Agent, Formulation Agent, Numerical Review Agent의 산출물을 입력으로 받아 Abaqus `.inp` 입력 계약과 결과 CSV schema를 정의해야 한다.
|
||||
기본 파일명은 `docs/io-definitions/<feature-id>-io.md` 형식을 사용한다. 각 문서는 Requirement Agent, Formulation Agent, Numerical Review Agent의 산출물을 입력으로 받아 Abaqus `.inp` 입력 계약, authoritative HDF5 result schema, deterministic CSV view schema를 정의해야 한다.
|
||||
|
||||
## I/O Definition Agent 역할
|
||||
|
||||
I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, output request mapping, comparison CSV schema를 정의한다.
|
||||
I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, output request mapping, HDF5 result schema, comparison CSV view schema를 정의한다.
|
||||
|
||||
수행한다:
|
||||
- 기능별 supported Abaqus keyword subset을 정의한다.
|
||||
- unsupported, ignored-with-warning, requires-user-decision keyword 정책을 정의한다.
|
||||
- model data와 history data를 내부 solver 개념으로 매핑한다.
|
||||
- node, element, set, material, section, boundary condition, load, step, output request의 의미 계약을 정의한다.
|
||||
- `displacements.csv`, `reactions.csv`, `element_forces.csv`, `stresses.csv` schema를 정의한다.
|
||||
- `results.h5`의 authoritative HDF5 schema를 정의한다.
|
||||
- `csv/displacements.csv`, `csv/reactions.csv`, `csv/element_forces.csv`, `csv/stresses.csv` deterministic CSV view schema를 정의한다.
|
||||
|
||||
수행하지 않는다:
|
||||
- parser를 구현하지 않는다.
|
||||
- C++ API나 파일 구조를 설계하지 않는다.
|
||||
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
|
||||
- reference CSV 결과를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- solver 결과와 reference 결과를 비교하지 않는다.
|
||||
- release readiness를 승인하지 않는다.
|
||||
- 명시적으로 정의되지 않은 Abaqus full compatibility를 주장하지 않는다.
|
||||
@@ -107,9 +108,33 @@ I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, o
|
||||
- step: <semantic contract>
|
||||
- output_request: <semantic contract>
|
||||
|
||||
## Output and CSV Schemas
|
||||
## Output HDF5 Schema
|
||||
|
||||
### displacements.csv
|
||||
- authoritative_file: `results.h5`
|
||||
- schema_version: <version>
|
||||
- root_attributes: units, coordinate_system, solver_version, feature_id, model_id
|
||||
- step_frame_identity: <step/frame naming and ordering>
|
||||
- row_identity_policy: <node_id | element_id | integration_point | component mapping>
|
||||
|
||||
| quantity | dataset_path | shape | dtype | required_attributes | location | notes |
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| displacement | /steps/<step>/frames/<frame>/field_outputs/U | <nnode, ndim> | float64 | component_names, units | nodal | |
|
||||
| reaction | /steps/<step>/frames/<frame>/field_outputs/RF | <nnode, ndim> | float64 | component_names, units | nodal | |
|
||||
| element_force | /steps/<step>/frames/<frame>/field_outputs/element_forces | <nrow, ncomp> | float64 | component_names, element_ids, location | element | feature-dependent |
|
||||
| stress | /steps/<step>/frames/<frame>/field_outputs/S | <nrow, ncomp> | float64 | component_names, element_ids, integration_points | integration_point | feature-dependent |
|
||||
|
||||
## Deterministic CSV View Schemas
|
||||
|
||||
CSV view는 HDF5 dataset에서 추출한 deterministic comparison view이며 authoritative storage가 아니다.
|
||||
|
||||
공통 규칙:
|
||||
- directory: `csv/`
|
||||
- sort_order: step, frame, id, location, component
|
||||
- numeric_format: <precision and exponent policy>
|
||||
- missing_component_policy: 0 | N/A | omitted, feature-specific
|
||||
- view_source: HDF5 dataset path를 각 파일 metadata 또는 report에 기록한다.
|
||||
|
||||
### csv/displacements.csv
|
||||
| column | type | description |
|
||||
| --- | --- | --- |
|
||||
| step | string | step name or index |
|
||||
@@ -119,7 +144,7 @@ I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, o
|
||||
| uy | float | displacement component or 0/N/A |
|
||||
| uz | float | displacement component or 0/N/A |
|
||||
|
||||
### reactions.csv
|
||||
### csv/reactions.csv
|
||||
| column | type | description |
|
||||
| --- | --- | --- |
|
||||
| step | string | step name or index |
|
||||
@@ -129,7 +154,7 @@ I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, o
|
||||
| rfy | float | reaction component or 0/N/A |
|
||||
| rfz | float | reaction component or 0/N/A |
|
||||
|
||||
### element_forces.csv
|
||||
### csv/element_forces.csv
|
||||
| column | type | description |
|
||||
| --- | --- | --- |
|
||||
| step | string | step name or index |
|
||||
@@ -139,7 +164,7 @@ I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, o
|
||||
| component | string | force component name |
|
||||
| value | float | component value |
|
||||
|
||||
### stresses.csv
|
||||
### csv/stresses.csv
|
||||
| column | type | description |
|
||||
| --- | --- | --- |
|
||||
| step | string | step name or index |
|
||||
@@ -157,6 +182,8 @@ I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, o
|
||||
- set_expansion: <policy>
|
||||
- coordinate_conventions: <policy>
|
||||
- output_quantity_availability: <policy>
|
||||
- hdf5_schema_validation: <required datasets and attributes>
|
||||
- csv_view_validation: <stable ordering and required columns>
|
||||
|
||||
## Open Issues and Downstream Handoff
|
||||
|
||||
@@ -164,10 +191,10 @@ I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, o
|
||||
- <Abaqus input examples and reference artifact schema needs>
|
||||
|
||||
### Implementation Planning Agent
|
||||
- <parser acceptance cases, unsupported keyword diagnostics, CSV writer tests>
|
||||
- <parser acceptance cases, unsupported keyword diagnostics, HDF5 writer tests, CSV view exporter tests>
|
||||
|
||||
### Reference Verification Agent
|
||||
- <CSV schemas, ID matching rules, units, coordinate conventions, tolerance-relevant fields>
|
||||
- <HDF5 dataset paths, CSV view schemas, ID matching rules, units, coordinate conventions, tolerance-relevant fields>
|
||||
```
|
||||
|
||||
## 품질 기준
|
||||
@@ -177,4 +204,6 @@ I/O Definition Agent는 Abaqus input file subset, 내부 solver model mapping, o
|
||||
- model data와 history data의 매핑을 구분해야 한다.
|
||||
- unsupported keyword 처리 정책을 명확히 해야 한다.
|
||||
- 내부 모델 계약은 semantic fields로 작성하고 C++ class/function/API를 확정하지 않는다.
|
||||
- CSV schema는 column name, ID field, component naming, coordinate system, units, step/frame identity, quantity location을 포함해야 한다.
|
||||
- `results.h5`가 authoritative solver output임을 명시해야 한다.
|
||||
- HDF5 schema는 dataset path, dtype/shape, required attributes, ID field, component naming, coordinate system, units, step/frame identity, quantity location을 포함해야 한다.
|
||||
- CSV view schema는 column name, stable sort order, ID field, component naming, coordinate system, units, step/frame identity, quantity location을 포함해야 한다.
|
||||
|
||||
@@ -20,7 +20,7 @@ Numerical Review Agent는 정식화의 수학적 일관성, 수치 안정성 위
|
||||
- 정식화 문서를 직접 수정하지 않는다.
|
||||
- C++ API나 파일 구조를 설계하지 않는다.
|
||||
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
|
||||
- reference CSV 결과를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- release readiness를 승인하지 않는다.
|
||||
- 레퍼런스 결과와 구현 솔버 결과의 일치 여부를 판정하지 않는다.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
이 디렉터리는 Physics Evaluation Agent가 작성하거나 제안하는 기능별 physics evaluation report를 보관하는 위치다.
|
||||
|
||||
Physics Evaluation Agent는 Reference Verification Agent가 `pass-for-physics-evaluation`으로 넘긴 결과에 대해 물리적 타당성을 검토한다. 이 agent는 reference tolerance를 다시 판정하지 않고, 평형, 반력 부호/합력, 변위 방향, 대칭성, 요소내력/응력 위치, rigid body mode 징후, energy/residual sanity, 테스트 모델 coverage를 검토한다.
|
||||
Physics Evaluation Agent는 Reference Verification Agent가 `pass-for-physics-evaluation`로 넘긴 결과에 대해 물리적 타당성을 검토한다. 이 agent는 reference tolerance를 다시 판정하지 않고, HDF5 결과와 deterministic CSV views를 읽기 전용 evidence로 사용해 평형, 반력 부호, 변위 방향, 대칭성, 요소내력/응력 위치, rigid body mode 징후, energy/residual sanity, 테스트 모델 coverage를 검토한다.
|
||||
|
||||
기본 문서명은 `docs/physics-evaluations/<feature-id>-physics-evaluation.md` 형식을 사용한다.
|
||||
|
||||
@@ -23,7 +23,7 @@ Physics Evaluation Agent는 Reference Verification Agent가 `pass-for-physics-ev
|
||||
- requirements, formulations, I/O contracts, reference model contracts를 수정하지 않는다.
|
||||
- reference artifacts 또는 tolerance policies를 수정하지 않는다.
|
||||
- Abaqus, Nastran 또는 reference solver를 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- reference tolerance를 다시 판정하지 않는다.
|
||||
- release readiness를 승인하지 않는다.
|
||||
- release notes 또는 final release checklist를 작성하지 않는다.
|
||||
@@ -39,7 +39,8 @@ EVIDENCE CHECK -> PHYSICS CHECKS -> CLASSIFY -> REPORT
|
||||
`EVIDENCE CHECK`에서 다음 항목을 확인한다.
|
||||
|
||||
- Reference Verification report status가 `pass-for-physics-evaluation`인지 여부
|
||||
- checked solver/reference CSVs
|
||||
- checked solver/reference HDF5 files
|
||||
- checked deterministic CSV views
|
||||
- compared quantities
|
||||
- model purpose
|
||||
- documented physical expectations
|
||||
@@ -53,20 +54,20 @@ EVIDENCE CHECK -> PHYSICS CHECKS -> CLASSIFY -> REPORT
|
||||
- `reaction consistency`: constrained DOF와 reaction component가 경계조건과 일관적인지 검토한다.
|
||||
- `displacement direction`: 하중 방향, 구속조건, 예상 변형 모드와 변위 부호/방향이 맞는지 검토한다.
|
||||
- `symmetry`: symmetry, antisymmetry, expected zero component가 모델 목적과 일치하는지 검토한다.
|
||||
- `element force balance`: element internal force와 외력/반력의 균형 또는 부호 일관성을 검토한다.
|
||||
- `element force balance`: element internal force가 외력/반력 균형 또는 부호 일관성을 만족하는지 검토한다.
|
||||
- `stress/strain`: stress/strain 부호, component, coordinate system, output location이 모델 expectation과 일치하는지 검토한다.
|
||||
- `rigid body mode`: 불완전 구속, 비정상적으로 큰 변위, near-zero stiffness 징후를 검토한다.
|
||||
- `energy/residual`: energy_or_residual.csv 또는 residual output이 있을 때 energy balance, residual trend, convergence sanity를 검토한다.
|
||||
- `energy/residual`: `csv/energy_or_residual.csv` 또는 residual output이 있을 때 energy balance, residual trend, convergence sanity를 검토한다.
|
||||
- `model coverage`: reference model이 claimed feature를 충분히 검증하는지 검토한다.
|
||||
|
||||
## Failure Classification
|
||||
|
||||
- `equilibrium-failure`: 전체 하중-반력 또는 모멘트 평형이 기대와 다르다.
|
||||
- `reaction-inconsistency`: constrained DOF reaction이 boundary condition 또는 load path와 일관되지 않다.
|
||||
- `displacement-direction-failure`: 변위 방향 또는 부호가 하중/구속조건과 물리적으로 맞지 않다.
|
||||
- `reaction-inconsistency`: constrained DOF reaction이 boundary condition 또는 load path와 일관되지 않는다.
|
||||
- `displacement-direction-failure`: 변위 방향 또는 부호가 하중/구속조건과 물리적으로 맞지 않는다.
|
||||
- `symmetry-failure`: expected symmetry, antisymmetry, zero component가 깨졌다.
|
||||
- `stress-location-failure`: stress/strain output location 또는 component 해석이 물리 expectation과 맞지 않다.
|
||||
- `element-force-inconsistency`: element internal force balance 또는 sign이 일관되지 않다.
|
||||
- `stress-location-failure`: stress/strain output location 또는 component 해석이 물리 expectation과 맞지 않는다.
|
||||
- `element-force-inconsistency`: element internal force balance 또는 sign이 일관되지 않는다.
|
||||
- `rigid-body-mode-suspected`: rigid body mode 또는 under-constrained model 징후가 있다.
|
||||
- `nonfinite-result`: NaN 또는 infinite value가 있다.
|
||||
- `model-coverage-gap`: reference model이 기능을 충분히 검증하지 못한다.
|
||||
@@ -93,8 +94,10 @@ EVIDENCE CHECK -> PHYSICS CHECKS -> CLASSIFY -> REPORT
|
||||
| evidence | path_or_source | status | notes |
|
||||
| --- | --- | --- | --- |
|
||||
| reference_verification | docs/reference-verifications/<feature-id>-reference-verification.md | pass-for-physics-evaluation | <summary> |
|
||||
| solver_results | <solver CSV path> | present | missing | <summary> |
|
||||
| reference_results | references/<feature-id>/<model-id>/ | present | missing | <summary> |
|
||||
| solver_hdf5 | <solver output directory>/results.h5 | present | missing | <summary> |
|
||||
| solver_csv_views | <solver output directory>/csv/ | present | missing | <summary or N/A> |
|
||||
| reference_hdf5 | references/<feature-id>/<model-id>/reference.h5 | present | missing | <summary> |
|
||||
| reference_csv_views | references/<feature-id>/<model-id>/csv/ | present | missing | <summary> |
|
||||
| model_purpose | docs/reference-models/<feature-id>-reference-models.md | documented | missing | <summary> |
|
||||
| physical_expectations | <source docs> | documented | missing | <summary> |
|
||||
|
||||
@@ -160,5 +163,6 @@ EVIDENCE CHECK -> PHYSICS CHECKS -> CLASSIFY -> REPORT
|
||||
- documented expectation이 없는 항목은 pass/fail로 판정하지 않고 `skipped`, `needs-upstream-decision`, 또는 `needs-reference-model`로 둔다.
|
||||
- 평형 검토는 적용 하중, 반력, element/internal force sign convention이 문서화된 경우에만 수행한다.
|
||||
- stress/strain 검토는 output location, component naming, coordinate system, units가 정의된 경우에만 수행한다.
|
||||
- HDF5와 deterministic CSV views는 읽기 전용 evidence로만 사용한다.
|
||||
- pass는 Release Agent로 넘길 수 있다는 뜻이며 release readiness 승인이 아니다.
|
||||
- reference artifacts와 tolerance policies는 수정하지 않는다.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
이 디렉터리는 Reference Model Agent가 작성하거나 제안한 기능별 reference model 설계 문서를 보관하는 위치다.
|
||||
|
||||
Reference Model Agent는 FESA 기능 검증에 필요한 Abaqus `.inp` 기반 테스트 모델 포트폴리오와 `references/<feature-id>/<model-id>/` artifact bundle 계약을 정의한다. Agent는 Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않고, reference CSV 값을 생성하지 않으며, solver 결과 비교나 release readiness 승인도 하지 않는다.
|
||||
Reference Model Agent는 FESA 기능 검증에 필요한 Abaqus `.inp` 기반 테스트 모델 포트폴리오와 `references/<feature-id>/<model-id>/` artifact bundle 계약을 정의한다. Agent는 Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않고, reference HDF5 파일이나 deterministic CSV view 값을 생성하지 않으며, solver 결과 비교나 release readiness 승인도 하지 않는다.
|
||||
|
||||
기본 파일명은 `docs/reference-models/<feature-id>-reference-models.md` 형식을 사용한다. 각 문서는 요구조건, 연구 브리프, 정식화, 수치 리뷰, I/O 정의를 입력으로 받아 구현 전에 준비해야 할 테스트 모델과 reference artifact 요구사항을 정의해야 한다.
|
||||
|
||||
@@ -13,7 +13,7 @@ Reference Model Agent는 FESA 기능 검증에 필요한 Abaqus `.inp` 기반
|
||||
- `model.inp`가 I/O Definition Agent의 supported Abaqus keyword subset 안에 있는지 확인한다.
|
||||
- `references/<feature-id>/<model-id>/` artifact bundle 구조와 필수 파일을 정의한다.
|
||||
- `metadata.json` provenance, 단위, 좌표계, Abaqus version/source, output request, tolerance 정책을 정의한다.
|
||||
- `displacements.csv`, `reactions.csv`, `element_forces.csv`, `stresses.csv` 요구사항을 정의한다.
|
||||
- `reference.h5` 요구사항과 HDF5 dataset에서 추출되는 deterministic CSV view 요구사항을 정의한다.
|
||||
- requirement와 model, compared quantity, tolerance, artifact status를 연결하는 Coverage Matrix를 작성한다.
|
||||
|
||||
수행하지 않는다:
|
||||
@@ -21,7 +21,7 @@ Reference Model Agent는 FESA 기능 검증에 필요한 Abaqus `.inp` 기반
|
||||
- parser를 구현하지 않는다.
|
||||
- C++ API나 파일 구조를 설계하지 않는다.
|
||||
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- solver 결과를 비교하지 않는다.
|
||||
- release readiness를 승인하지 않는다.
|
||||
- reference 값, tolerance, Abaqus compatibility를 임의로 만들지 않는다.
|
||||
@@ -53,11 +53,11 @@ Reference Model Agent는 FESA 기능 검증에 필요한 Abaqus `.inp` 기반
|
||||
|
||||
| model_id | category | purpose | status | required_artifacts |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| <model-id> | smoke | <basic parser/solve path> | draft | model.inp, metadata.json, required CSVs |
|
||||
| <model-id> | analytical | <closed-form comparison> | draft | model.inp, metadata.json, required CSVs |
|
||||
| <model-id> | patch test | <element consistency check> | draft | model.inp, metadata.json, required CSVs |
|
||||
| <model-id> | benchmark | <trusted benchmark comparison> | draft | model.inp, metadata.json, required CSVs |
|
||||
| <model-id> | regression | <known defect guard> | draft | model.inp, metadata.json, required CSVs |
|
||||
| <model-id> | smoke | <basic parser/solve path> | draft | model.inp, metadata.json, reference.h5, required CSV views |
|
||||
| <model-id> | analytical | <closed-form comparison> | draft | model.inp, metadata.json, reference.h5, required CSV views |
|
||||
| <model-id> | patch test | <element consistency check> | draft | model.inp, metadata.json, reference.h5, required CSV views |
|
||||
| <model-id> | benchmark | <trusted benchmark comparison> | draft | model.inp, metadata.json, reference.h5, required CSV views |
|
||||
| <model-id> | regression | <known defect guard> | draft | model.inp, metadata.json, reference.h5, required CSV views |
|
||||
| <model-id> | negative/invalid-input | <unsupported keyword or invalid model diagnostic> | draft | model.inp, metadata.json |
|
||||
|
||||
## Model Record
|
||||
@@ -81,7 +81,7 @@ Reference Model Agent는 FESA 기능 검증에 필요한 Abaqus `.inp` 기반
|
||||
- supported_keyword_subset: <keywords from docs/io-definitions/<feature-id>-io.md>
|
||||
- model_data: <nodes, elements, sets, material, section, coordinates, units>
|
||||
- history_data: <step, procedure, boundary conditions, loads, output requests>
|
||||
- output_requests: <requests needed to populate reference CSV files>
|
||||
- output_requests: <requests needed to populate reference.h5 datasets and deterministic CSV views>
|
||||
- unsupported_keyword_policy: unsupported | ignored-with-warning | requires-user-decision
|
||||
|
||||
## Artifact Bundle Contract
|
||||
@@ -92,25 +92,28 @@ references/
|
||||
<model-id>/
|
||||
model.inp
|
||||
metadata.json
|
||||
displacements.csv
|
||||
reactions.csv
|
||||
element_forces.csv
|
||||
stresses.csv
|
||||
reference.h5
|
||||
csv/
|
||||
displacements.csv
|
||||
reactions.csv
|
||||
element_forces.csv
|
||||
stresses.csv
|
||||
README.md
|
||||
```
|
||||
|
||||
Required files:
|
||||
- `model.inp`: Abaqus input file for the reference model.
|
||||
- `metadata.json`: provenance and model contract metadata.
|
||||
- `displacements.csv`: nodal displacement reference results.
|
||||
- `reactions.csv`: nodal reaction force reference results.
|
||||
- `element_forces.csv`: element internal force reference results.
|
||||
- `stresses.csv`: stress reference results.
|
||||
- `reference.h5`: authoritative reference result artifact.
|
||||
- `csv/displacements.csv`: deterministic view of nodal displacement reference results.
|
||||
- `csv/reactions.csv`: deterministic view of nodal reaction force reference results.
|
||||
- `csv/element_forces.csv`: deterministic view of element internal force reference results.
|
||||
- `csv/stresses.csv`: deterministic view of stress reference results.
|
||||
- `README.md`: short description, generation notes, and limitations.
|
||||
|
||||
Optional files:
|
||||
- `strains.csv`: strain reference results when required.
|
||||
- `energy_or_residual.csv`: energy, residual, or convergence reference results when required.
|
||||
- `csv/strains.csv`: deterministic strain view when required.
|
||||
- `csv/energy_or_residual.csv`: deterministic energy, residual, or convergence view when required.
|
||||
- `notes.md`: manual review notes.
|
||||
|
||||
## Metadata JSON Contract
|
||||
@@ -132,62 +135,70 @@ Optional files:
|
||||
"boundary_condition_summary": "<summary>",
|
||||
"load_summary": "<summary>",
|
||||
"output_requests": ["U", "RF", "S", "<feature-specific quantities>"],
|
||||
"csv_schema_version": "<version>",
|
||||
"hdf5_schema_version": "<version>",
|
||||
"csv_view_schema_version": "<version>",
|
||||
"csv_view_source": "reference.h5",
|
||||
"tolerance_policy": "<absolute/relative/norm policy>",
|
||||
"limitations": ["<known limitation>"]
|
||||
}
|
||||
```
|
||||
|
||||
## Reference CSV Requirements
|
||||
## Reference HDF5 and CSV View Requirements
|
||||
|
||||
### displacements.csv
|
||||
### reference.h5
|
||||
- Required when any numerical reference comparison is part of the acceptance criteria.
|
||||
- Must include schema version, units, coordinate system, step/frame identity, output location, component naming, and row identity metadata.
|
||||
- Must contain datasets sufficient to derive all required deterministic CSV views.
|
||||
|
||||
### csv/displacements.csv
|
||||
- Required when nodal displacement is a verification quantity.
|
||||
- Must include step/frame identity, node id, displacement components, coordinate system, and units.
|
||||
|
||||
### reactions.csv
|
||||
### csv/reactions.csv
|
||||
- Required when constrained DOF reactions or global equilibrium are verification quantities.
|
||||
- Must include step/frame identity, node id, reaction components, coordinate system, and units.
|
||||
|
||||
### element_forces.csv
|
||||
### csv/element_forces.csv
|
||||
- Required when element internal force is a verification quantity.
|
||||
- Must include step/frame identity, element id, output location, component, value, and units.
|
||||
|
||||
### stresses.csv
|
||||
### csv/stresses.csv
|
||||
- Required when stress is a verification quantity.
|
||||
- Must include step/frame identity, element id, integration point or recovery location, component, value, coordinate system, and units.
|
||||
|
||||
### Optional CSVs
|
||||
- `strains.csv`: required when strain is part of the acceptance criteria.
|
||||
- `energy_or_residual.csv`: required when energy balance, residual, or convergence data is part of the acceptance criteria.
|
||||
### Optional CSV Views
|
||||
- `csv/strains.csv`: required when strain is part of the acceptance criteria.
|
||||
- `csv/energy_or_residual.csv`: required when energy balance, residual, or convergence data is part of the acceptance criteria.
|
||||
|
||||
## Coverage Matrix
|
||||
|
||||
| requirement_id | model_id | compared_quantity | artifact_file | tolerance | verification_method | status |
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| <req-id> | <model-id> | displacement | displacements.csv | <policy> | reference-comparison | draft |
|
||||
| <req-id> | <model-id> | reaction | reactions.csv | <policy> | reference-comparison | draft |
|
||||
| <req-id> | <model-id> | element force | element_forces.csv | <policy> | reference-comparison | draft |
|
||||
| <req-id> | <model-id> | stress | stresses.csv | <policy> | reference-comparison | draft |
|
||||
| requirement_id | model_id | compared_quantity | hdf5_dataset | csv_view | tolerance | verification_method | status |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| <req-id> | <model-id> | displacement | <dataset path> | csv/displacements.csv | <policy> | reference-comparison | draft |
|
||||
| <req-id> | <model-id> | reaction | <dataset path> | csv/reactions.csv | <policy> | reference-comparison | draft |
|
||||
| <req-id> | <model-id> | element force | <dataset path> | csv/element_forces.csv | <policy> | reference-comparison | draft |
|
||||
| <req-id> | <model-id> | stress | <dataset path> | csv/stresses.csv | <policy> | reference-comparison | draft |
|
||||
|
||||
## Artifact Acceptance Checklist
|
||||
- 모든 `must` requirement가 최소 하나의 `model_id`와 `compared_quantity`에 연결되어 있다.
|
||||
- `model.inp`가 기능별 supported Abaqus keyword subset을 벗어나지 않는다.
|
||||
- `metadata.json`에 provenance, Abaqus version/source, units, coordinate system, tolerance, CSV schema version이 기록되어 있다.
|
||||
- 필수 CSV 파일이 존재하거나, 기능상 불필요한 파일은 명확한 reason과 함께 제외되어 있다.
|
||||
- output request가 필요한 CSV 물리량을 생성할 수 있도록 정의되어 있다.
|
||||
- reference CSV가 없으면 status는 `needs-reference-artifacts`다.
|
||||
- `metadata.json`에 provenance, Abaqus version/source, units, coordinate system, tolerance, HDF5 schema version, CSV view schema version이 기록되어 있다.
|
||||
- `reference.h5`가 존재하거나, 기능상 불필요하면 명확한 reason과 함께 제외되어 있다.
|
||||
- 필수 deterministic CSV view가 존재하거나, 기능상 불필요한 view는 명확한 reason과 함께 제외되어 있다.
|
||||
- output request가 필요한 HDF5 dataset과 CSV view 물리량을 생성할 수 있도록 정의되어 있다.
|
||||
- `reference.h5` 또는 required CSV view가 없으면 status는 `needs-reference-artifacts`다.
|
||||
- tolerance, source, units, coordinate system이 불명확하면 status는 `needs-user-decision`이다.
|
||||
|
||||
## Open Issues and Downstream Handoff
|
||||
|
||||
### I/O Definition Agent
|
||||
- <supported keyword, output request, CSV schema clarification>
|
||||
- <supported keyword, output request, HDF5 schema clarification, CSV view schema clarification>
|
||||
|
||||
### Implementation Planning Agent
|
||||
- <tests that should fail before implementation, model order, acceptance criteria>
|
||||
|
||||
### Reference Verification Agent
|
||||
- <CSV schema, ID matching, units, coordinate conventions, output locations, tolerance mapping>
|
||||
- <HDF5 dataset paths, CSV view schema, ID matching, units, coordinate conventions, output locations, tolerance mapping>
|
||||
|
||||
### Physics Evaluation Agent
|
||||
- <equilibrium, symmetry, displacement direction, stress location, rigid body mode, load path sanity checks>
|
||||
@@ -198,8 +209,8 @@ Optional files:
|
||||
- Reference model의 목적과 검증 대상 requirement가 명확해야 한다.
|
||||
- `model.inp`는 Abaqus input file이며, 기능별 supported keyword subset을 따라야 한다.
|
||||
- model data와 history data를 구분해야 한다.
|
||||
- output request와 required CSV 사이의 연결이 명확해야 한다.
|
||||
- output request와 required HDF5 dataset/CSV view 사이의 연결이 명확해야 한다.
|
||||
- `references/<feature-id>/<model-id>/` 구조와 필수 artifact가 명시되어야 한다.
|
||||
- `metadata.json`에는 provenance, Abaqus version/source, units, coordinate system, tolerance, CSV schema version이 포함되어야 한다.
|
||||
- reference CSV가 없으면 완료 상태가 아니라 `needs-reference-artifacts` 상태로 둔다.
|
||||
- 모든 `must` requirement는 Coverage Matrix에서 model, compared quantity, tolerance, verification method로 추적되어야 한다.
|
||||
- `metadata.json`에는 provenance, Abaqus version/source, units, coordinate system, tolerance, HDF5 schema version, CSV view schema version이 포함되어야 한다.
|
||||
- `reference.h5` 또는 required CSV view가 없으면 완료 상태가 아니라 `needs-reference-artifacts` 상태로 둔다.
|
||||
- 모든 `must` requirement는 Coverage Matrix에서 model, compared quantity, HDF5 dataset, CSV view, tolerance, verification method로 추적되어야 한다.
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
이 디렉터리는 Reference Verification Agent가 작성하거나 제안하는 기능별 reference comparison report를 보관하는 위치다.
|
||||
|
||||
Reference Verification Agent는 Build/Test Executor Agent 통과 후 generated solver result CSV와 stored Abaqus reference CSV artifacts를 tolerance 기준으로 비교한다. 이 agent는 comparison과 report만 수행하며, source code, tests, CMake files, requirements, formulations, I/O contracts, reference artifacts, tolerance policies를 수정하지 않는다.
|
||||
Reference Verification Agent는 Build/Test Executor Agent 통과 후 generated solver `results.h5`와 stored reference `reference.h5`를 tolerance 기준으로 비교한다. CSV는 authoritative storage가 아니라 HDF5 dataset에서 추출한 deterministic CSV view이다. 이 agent는 comparison과 report만 수행하며, source code, tests, CMake files, requirements, formulations, I/O contracts, reference artifacts, tolerance policies를 수정하지 않는다.
|
||||
|
||||
기본 문서명은 `docs/reference-verifications/<feature-id>-reference-verification.md` 형식을 사용한다.
|
||||
|
||||
## Reference Verification Agent 역할
|
||||
|
||||
수행한다:
|
||||
- `references/<feature-id>/<model-id>/` artifact bundle과 generated solver result CSV를 확인한다.
|
||||
- `metadata.json`, schema version, units, coordinate system, step/frame identity, node/element IDs, output location, tolerance source를 확인한다.
|
||||
- `displacements.csv`, `reactions.csv`, `element_forces.csv`, `stresses.csv`를 기본 비교 대상으로 삼는다.
|
||||
- upstream 문서가 요구할 때만 `strains.csv`, `energy_or_residual.csv`를 추가 비교한다.
|
||||
- `references/<feature-id>/<model-id>/` artifact bundle과 generated solver `results.h5`를 확인한다.
|
||||
- `metadata.json`, `reference.h5`, required deterministic CSV views, schema version, units, coordinate system, step/frame identity, node/element IDs, output location, tolerance source를 확인한다.
|
||||
- HDF5 dataset을 authoritative 비교 대상으로 삼고, `csv/displacements.csv`, `csv/reactions.csv`, `csv/element_forces.csv`, `csv/stresses.csv`는 deterministic row view로 사용한다.
|
||||
- upstream 문서가 요구할 때만 `csv/strains.csv`, `csv/energy_or_residual.csv`를 추가 비교한다.
|
||||
- max absolute error, max relative error, RMS error, norm error, worst node/element/component, missing rows, extra rows, pass/fail을 보고한다.
|
||||
- 실패를 missing-reference-artifact, missing-solver-output, schema-mismatch, id-mismatch, unit-or-coordinate-mismatch, tolerance-failure, nonfinite-result, upstream-contract, environment로 분류한다.
|
||||
|
||||
@@ -23,8 +23,8 @@ Reference Verification Agent는 Build/Test Executor Agent 통과 후 generated s
|
||||
- requirements, formulations, I/O contracts, reference model contracts를 수정하지 않는다.
|
||||
- reference artifacts 또는 tolerance policies를 수정하지 않는다.
|
||||
- Abaqus, Nastran 또는 reference solver를 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- solver output CSV를 tolerance에 맞추기 위해 보정하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- solver output을 tolerance에 맞추기 위해 보정하지 않는다.
|
||||
- physics validation success 또는 release readiness를 승인하지 않는다.
|
||||
|
||||
## 실행 순서
|
||||
@@ -38,9 +38,11 @@ ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT
|
||||
`ARTIFACT CHECK`에서 다음 항목이 없으면 비교를 시작하지 않는다.
|
||||
|
||||
- `metadata.json`
|
||||
- required reference CSV files
|
||||
- generated solver result CSV files
|
||||
- schema version
|
||||
- stored reference `reference.h5`
|
||||
- generated solver `results.h5`
|
||||
- required deterministic CSV view files
|
||||
- HDF5 schema version
|
||||
- CSV view schema version
|
||||
- units
|
||||
- coordinate system
|
||||
- step/frame identity
|
||||
@@ -50,21 +52,27 @@ ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT
|
||||
|
||||
## 비교 대상
|
||||
|
||||
기본 비교 대상:
|
||||
- `displacements.csv`: nodal displacement
|
||||
- `reactions.csv`: nodal reaction force
|
||||
- `element_forces.csv`: element internal force
|
||||
- `stresses.csv`: element stress
|
||||
Authoritative 비교 대상:
|
||||
- `results.h5`와 `reference.h5`의 displacement datasets
|
||||
- `results.h5`와 `reference.h5`의 reaction datasets
|
||||
- `results.h5`와 `reference.h5`의 element force datasets
|
||||
- `results.h5`와 `reference.h5`의 stress datasets
|
||||
|
||||
선택 비교 대상:
|
||||
- `strains.csv`: strain이 acceptance criteria에 포함된 경우
|
||||
- `energy_or_residual.csv`: energy, residual, convergence quantity가 acceptance criteria에 포함된 경우
|
||||
기본 deterministic CSV view:
|
||||
- `csv/displacements.csv`: nodal displacement
|
||||
- `csv/reactions.csv`: nodal reaction force
|
||||
- `csv/element_forces.csv`: element internal force
|
||||
- `csv/stresses.csv`: element stress
|
||||
|
||||
선택 deterministic CSV view:
|
||||
- `csv/strains.csv`: strain이 acceptance criteria에 포함된 경우
|
||||
- `csv/energy_or_residual.csv`: energy, residual, convergence quantity가 acceptance criteria에 포함된 경우
|
||||
|
||||
## Failure Classification
|
||||
|
||||
- `missing-reference-artifact`: required stored reference file 또는 provenance가 없다.
|
||||
- `missing-solver-output`: generated solver result CSV 또는 comparison command가 없다.
|
||||
- `schema-mismatch`: reference CSV와 solver CSV column/schema가 다르다.
|
||||
- `missing-solver-output`: generated solver `results.h5` 또는 comparison command가 없다.
|
||||
- `schema-mismatch`: reference HDF5, solver HDF5, 또는 deterministic CSV view schema가 다르다.
|
||||
- `id-mismatch`: node id, element id, step/frame, integration point, component matching이 실패했다.
|
||||
- `unit-or-coordinate-mismatch`: units 또는 coordinate system이 비교 가능하지 않다.
|
||||
- `tolerance-failure`: schema와 matching은 유효하지만 error가 tolerance를 초과했다.
|
||||
@@ -93,31 +101,32 @@ ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT
|
||||
| --- | --- | --- | --- |
|
||||
| reference_bundle | references/<feature-id>/<model-id>/ | present | missing | <notes> |
|
||||
| metadata | references/<feature-id>/<model-id>/metadata.json | present | missing | <provenance summary> |
|
||||
| reference_displacements | references/<feature-id>/<model-id>/displacements.csv | present | missing | <notes> |
|
||||
| reference_reactions | references/<feature-id>/<model-id>/reactions.csv | present | missing | <notes> |
|
||||
| reference_element_forces | references/<feature-id>/<model-id>/element_forces.csv | present | missing | <notes> |
|
||||
| reference_stresses | references/<feature-id>/<model-id>/stresses.csv | present | missing | <notes> |
|
||||
| solver_outputs | <solver output directory> | present | missing | <notes> |
|
||||
| reference_hdf5 | references/<feature-id>/<model-id>/reference.h5 | present | missing | <schema summary> |
|
||||
| reference_csv_views | references/<feature-id>/<model-id>/csv/ | present | missing | <view inventory> |
|
||||
| solver_hdf5 | <solver output directory>/results.h5 | present | missing | <schema summary> |
|
||||
| solver_csv_views | <solver output directory>/csv/ | present | missing | <view inventory or N/A> |
|
||||
|
||||
## Comparison Contract
|
||||
- schema_version: <version>
|
||||
- hdf5_schema_version: <version>
|
||||
- csv_view_schema_version: <version>
|
||||
- id_matching: node_id | element_id | step/frame | integration_point | component
|
||||
- units: <unit system>
|
||||
- coordinate_system: <global/local convention>
|
||||
- output_location: nodal | element | integration_point | centroid | recovery_location
|
||||
- component_naming: <component naming policy>
|
||||
- csv_view_sort_order: <step, frame, id, location, component order>
|
||||
- tolerance_source: <requirement/reference model/I/O document>
|
||||
- tolerance_policy: absolute | relative | norm-based | combined
|
||||
- zero_reference_policy: <policy or N/A>
|
||||
|
||||
## Quantity Results
|
||||
|
||||
| quantity | model_id | artifact_file | compared_rows | missing_rows | extra_rows | max_abs_error | max_rel_error | rms_error | norm_error | worst_id | worst_component | result |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| displacement | <model-id> | displacements.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <node id> | <component> | pass | fail |
|
||||
| reaction | <model-id> | reactions.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <node id> | <component> | pass | fail |
|
||||
| element force | <model-id> | element_forces.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <element id> | <component> | pass | fail |
|
||||
| stress | <model-id> | stresses.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <element/ip id> | <component> | pass | fail |
|
||||
| quantity | model_id | hdf5_dataset | csv_view | compared_rows | missing_rows | extra_rows | max_abs_error | max_rel_error | rms_error | norm_error | worst_id | worst_component | result |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| displacement | <model-id> | <dataset path> | csv/displacements.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <node id> | <component> | pass | fail |
|
||||
| reaction | <model-id> | <dataset path> | csv/reactions.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <node id> | <component> | pass | fail |
|
||||
| element force | <model-id> | <dataset path> | csv/element_forces.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <element id> | <component> | pass | fail |
|
||||
| stress | <model-id> | <dataset path> | csv/stresses.csv | <n> | <n> | <n> | <value> | <value> | <value> | <value or N/A> | <element/ip id> | <component> | pass | fail |
|
||||
|
||||
## Failure Classification
|
||||
- classification: missing-reference-artifact | missing-solver-output | schema-mismatch | id-mismatch | unit-or-coordinate-mismatch | tolerance-failure | nonfinite-result | upstream-contract | environment | N/A
|
||||
@@ -130,7 +139,7 @@ ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT
|
||||
| --- | --- | --- |
|
||||
| Correction Agent | <implementation-owned mismatch or nonfinite result> | <comparison metrics and failing quantity> |
|
||||
| Reference Model Agent | <missing or invalid reference artifact/provenance> | <artifact inventory> |
|
||||
| I/O Definition Agent | <schema, units, coordinate, output location mismatch> | <contract mismatch> |
|
||||
| I/O Definition Agent | <HDF5 schema, CSV view schema, units, coordinate, output location mismatch> | <contract mismatch> |
|
||||
| Physics Evaluation Agent | <reference comparisons passed> | <quantity results and report> |
|
||||
| Coordinator Agent | <blocked or repeated ambiguity> | <classification and open issue> |
|
||||
|
||||
@@ -151,15 +160,16 @@ ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT
|
||||
- `pass-for-physics-evaluation`: required reference comparisons가 모두 통과했고 Physics Evaluation Agent로 넘길 수 있다.
|
||||
- `needs-correction`: implementation-owned solver result mismatch 또는 nonfinite result가 있다.
|
||||
- `needs-reference-artifacts`: required reference artifact 또는 provenance가 누락됐다.
|
||||
- `needs-solver-results`: generated solver result CSV 또는 comparison command가 없다.
|
||||
- `needs-solver-results`: generated solver `results.h5` 또는 comparison command가 없다.
|
||||
- `needs-upstream-decision`: schema, tolerance, units, coordinate system, output location, ID matching policy가 누락 또는 충돌한다.
|
||||
- `blocked`: 사용자 또는 Coordinator Agent 결정 없이는 안전하게 진행할 수 없다.
|
||||
|
||||
## 품질 기준
|
||||
|
||||
- 모든 `must` requirement의 reference-comparison 항목은 model id, compared quantity, artifact file, tolerance에 trace되어야 한다.
|
||||
- reference artifact는 읽기 전용이다. `model.inp`, `metadata.json`, reference CSV를 수정하지 않는다.
|
||||
- solver output CSV는 비교 입력일 뿐이며 tolerance에 맞추기 위해 후처리 보정하지 않는다.
|
||||
- 모든 `must` requirement의 reference-comparison 항목은 model id, compared quantity, HDF5 dataset, CSV view, tolerance에 trace되어야 한다.
|
||||
- reference artifact는 읽기 전용이다. `model.inp`, `metadata.json`, `reference.h5`, `csv/*.csv`를 수정하지 않는다.
|
||||
- `results.h5`와 `reference.h5`가 authoritative 비교 입력이다.
|
||||
- deterministic CSV view는 행 정렬과 사람이 검토 가능한 비교 view일 뿐이며 tolerance에 맞추기 위해 후처리 보정하지 않는다.
|
||||
- stress/strain은 element id, integration point 또는 recovery location, component naming이 일치할 때만 비교한다.
|
||||
- nodal displacement/reaction은 node id, DOF/component, coordinate system, unit이 일치할 때만 비교한다.
|
||||
- missing rows와 extra rows를 숨기지 않고 보고한다.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
이 디렉터리는 Release Agent가 작성하거나 제안하는 기능별 release readiness report를 보관하는 위치다.
|
||||
|
||||
Release Agent는 Physics Evaluation Agent가 `pass-for-release-agent`로 넘긴 기능에 대해 최종 gate evidence를 감사한다. 이 Agent는 source code, tests, CMake, upstream 계약, reference artifacts, tolerance policies를 수정하지 않는다. 또한 Abaqus/Nastran 실행, reference CSV 생성, 외부 publish/deploy/package/tag/commit 작업을 수행하지 않는다.
|
||||
Release Agent는 Physics Evaluation Agent가 `pass-for-release-agent`로 넘긴 기능에 대해 최종 gate evidence를 감사한다. 이 Agent는 source code, tests, CMake, upstream 계약, reference artifacts, tolerance policies를 수정하지 않는다. 또한 Abaqus/Nastran 실행, reference HDF5/CSV view 생성, 외부 publish/deploy/package/tag/commit 작업을 수행하지 않는다.
|
||||
|
||||
기본 문서명은 `docs/releases/<feature-id>-release.md` 형식을 사용한다.
|
||||
|
||||
@@ -24,7 +24,7 @@ Release Agent는 Physics Evaluation Agent가 `pass-for-release-agent`로 넘긴
|
||||
- requirements, formulations, I/O contracts, numerical review reports, reference verification reports, physics evaluation reports를 수정하지 않는다.
|
||||
- reference artifacts 또는 tolerance policies를 수정하지 않는다.
|
||||
- Abaqus, Nastran 또는 reference solver를 실행하지 않는다.
|
||||
- reference CSV를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- 실패하거나 누락된 upstream gate를 우회하지 않는다.
|
||||
- 사용자 명시 요청 없이 publish, deploy, package, tag, commit, external release를 수행하지 않는다.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Requirement Agent는 솔버 기능 요청을 검증 가능한 요구조건으로
|
||||
- 유한요소 정식화를 확정하지 않는다.
|
||||
- C++ API나 파일 구조를 설계하지 않는다.
|
||||
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
|
||||
- reference CSV 결과를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- 기능 완료 여부를 승인하지 않는다.
|
||||
|
||||
## 문서 템플릿
|
||||
@@ -78,10 +78,11 @@ Expected location: `references/<feature-id>/`
|
||||
|
||||
- `model.inp`: required | not-applicable
|
||||
- `metadata.json`: required
|
||||
- `displacements.csv`: required | not-applicable
|
||||
- `reactions.csv`: required | not-applicable
|
||||
- `element_forces.csv`: required | not-applicable
|
||||
- `stresses.csv`: required | not-applicable
|
||||
- `reference.h5`: required | not-applicable
|
||||
- `csv/displacements.csv`: required | not-applicable
|
||||
- `csv/reactions.csv`: required | not-applicable
|
||||
- `csv/element_forces.csv`: required | not-applicable
|
||||
- `csv/stresses.csv`: required | not-applicable
|
||||
|
||||
## Requirement Verification Matrix
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Research Agent는 FEM 이론, benchmark, verification reference, solver manual,
|
||||
- 유한요소 정식화를 확정하지 않는다.
|
||||
- C++ API나 파일 구조를 설계하지 않는다.
|
||||
- Abaqus, Nastran 또는 레퍼런스 솔버를 직접 실행하지 않는다.
|
||||
- reference CSV 결과를 생성하지 않는다.
|
||||
- reference HDF5 파일이나 deterministic CSV view를 생성하지 않는다.
|
||||
- 기능 완료 여부를 승인하지 않는다.
|
||||
|
||||
## Source Reliability Tier
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,785 @@
|
||||
# Reference CSV Comparison Contract Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** Re-align FESA reference comparison contracts so FESA solver output remains authoritative HDF5, while Abaqus-derived reference results are CSV files compared directly against the FESA `results.h5` datasets.
|
||||
|
||||
**Architecture:** The active contract becomes `FESA results.h5 -> comparison normalizer -> Abaqus reference CSV`. Reference CSV files are authoritative reference artifacts; they are not deterministic CSV views derived from `reference.h5`, and `reference.h5` is no longer required. Existing documentation, skills, agent prompts, and Python contract tests must all describe the same flat reference folder shape.
|
||||
|
||||
**Tech Stack:** Markdown docs, Codex skill `SKILL.md`, agent TOML/YAML metadata, Python `unittest`, existing `scripts/validate_workspace.py`.
|
||||
|
||||
---
|
||||
|
||||
## Target Contract
|
||||
|
||||
Use this exact vocabulary across active contracts:
|
||||
|
||||
- FESA solver result: HDF5 file, normally `<solver-output-dir>/results.h5`.
|
||||
- Reference result: Abaqus-generated CSV files created by running the same Abaqus `.inp` model outside the agent workflow.
|
||||
- Comparison: read FESA HDF5 datasets and compare their normalized rows directly with reference CSV rows.
|
||||
- Reference root: `reference/`, singular, following the user-provided structure.
|
||||
|
||||
Required reference structure:
|
||||
|
||||
```text
|
||||
reference/
|
||||
<model-id>/
|
||||
<model-id>_displacements.csv
|
||||
<model-id>_reactions.csv
|
||||
<model-id>_internalforces.csv
|
||||
<model-id>_stresses.csv
|
||||
<model-id>_<quantity>.csv
|
||||
```
|
||||
|
||||
Quantity naming:
|
||||
|
||||
| quantity | reference CSV | FESA HDF5 source |
|
||||
| --- | --- | --- |
|
||||
| displacement | `reference/<model-id>/<model-id>_displacements.csv` | `/steps/<step>/frames/<frame>/field_outputs/U` |
|
||||
| reaction | `reference/<model-id>/<model-id>_reactions.csv` | `/steps/<step>/frames/<frame>/field_outputs/RF` |
|
||||
| internal force | `reference/<model-id>/<model-id>_internalforces.csv` | `/steps/<step>/frames/<frame>/field_outputs/element_forces` or feature-defined equivalent |
|
||||
| stress | `reference/<model-id>/<model-id>_stresses.csv` | `/steps/<step>/frames/<frame>/field_outputs/S` |
|
||||
|
||||
Allowed concept:
|
||||
|
||||
- A comparison command may materialize a deterministic CSV view from FESA HDF5 for debugging or review, but it is derived from `results.h5`, not an official solver output and not the reference artifact.
|
||||
|
||||
Prohibited active-contract claims:
|
||||
|
||||
- `reference.h5` is required.
|
||||
- `results.h5` and `reference.h5` are both authoritative comparison inputs.
|
||||
- Reference CSV files are deterministic views derived from `reference.h5`.
|
||||
- Reference bundles live only under `references/<feature-id>/<model-id>/`.
|
||||
|
||||
Historical plan files under `docs/superpowers/plans/` may mention older contracts, but active docs, skills, agents, and tests must not.
|
||||
|
||||
## File Structure
|
||||
|
||||
Modify these active contract files:
|
||||
|
||||
- `AGENTS.md`: project-level reference comparison rules.
|
||||
- `docs/ProjectInitialPlanNote.md`: initial plan notes where the old HDF5/reference-HDF5 decision was recorded.
|
||||
- `docs/PRD.md`: user-facing product/verification expectations.
|
||||
- `docs/ARCHITECTURE.md`: result and reference data-flow architecture.
|
||||
- `docs/ADR.md`: architecture decision record for HDF5 solver output and CSV reference artifacts.
|
||||
- `docs/SOLVER_AGENT_DESIGN.md`: agent workflow and gates.
|
||||
- `docs/SOLVER_SKILL_DESIGN.md`: skill workflow overview.
|
||||
- `docs/reference-models/README.md`: reference artifact bundle contract.
|
||||
- `docs/reference-verifications/README.md`: comparison report template and status rules.
|
||||
- `docs/io-definitions/README.md`: FESA HDF5 schema and comparison row schema handoff.
|
||||
- `docs/implementation-plans/README.md`: implementation planning data-flow contract.
|
||||
- `docs/physics-evaluations/README.md`: physics evidence inventory.
|
||||
- `docs/requirements/README.md`: reference artifact requirements section.
|
||||
|
||||
Modify these skills and UI metadata:
|
||||
|
||||
- `.codex/skills/fesa-reference-models/SKILL.md`
|
||||
- `.codex/skills/fesa-reference-models/agents/openai.yaml`
|
||||
- `.codex/skills/fesa-reference-comparison/SKILL.md`
|
||||
- `.codex/skills/fesa-reference-comparison/agents/openai.yaml`
|
||||
- `.codex/skills/fesa-io-contract/SKILL.md`
|
||||
- `.codex/skills/fesa-physics-sanity/SKILL.md`
|
||||
- `.codex/skills/fesa-cpp-msvc-tdd/SKILL.md`
|
||||
- `.codex/skills/fesa-release-readiness/SKILL.md`
|
||||
- `.codex/skills/fesa-requirements-baseline/SKILL.md`
|
||||
|
||||
Modify these agent configs:
|
||||
|
||||
- `.codex/agents/reference-model-agent.toml`
|
||||
- `.codex/agents/reference-verification-agent.toml`
|
||||
- `.codex/agents/io-definition-agent.toml`
|
||||
- `.codex/agents/implementation-planning-agent.toml`
|
||||
- `.codex/agents/implementation-agent.toml`
|
||||
- `.codex/agents/physics-evaluation-agent.toml`
|
||||
- `.codex/agents/release-agent.toml`
|
||||
- `.codex/agents/requirement-agent.toml`
|
||||
- `.codex/agents/coordinator-agent.toml`
|
||||
- Other `.codex/agents/*-agent.toml` files only where they contain stale `reference.h5` or `reference HDF5` claims.
|
||||
|
||||
Modify these Python contract tests:
|
||||
|
||||
- `scripts/test_fesa_solver_skills.py`
|
||||
- `scripts/test_reference_model_agent_config.py`
|
||||
- `scripts/test_reference_verification_agent_config.py`
|
||||
- `scripts/test_physics_evaluation_agent_config.py`
|
||||
- `scripts/test_io_definition_agent_config.py`
|
||||
- `scripts/test_implementation_planning_agent_config.py`
|
||||
- `scripts/test_requirement_agent_config.py`
|
||||
- `scripts/test_release_agent_config.py`
|
||||
- Any other `scripts/test_*_agent_config.py` that still asserts `Do not generate reference HDF5 files or deterministic CSV views.`
|
||||
|
||||
---
|
||||
|
||||
### Task 1: Update Contract Tests First
|
||||
|
||||
**Files:**
|
||||
- Modify: `scripts/test_fesa_solver_skills.py`
|
||||
- Modify: `scripts/test_reference_model_agent_config.py`
|
||||
- Modify: `scripts/test_reference_verification_agent_config.py`
|
||||
- Modify: `scripts/test_physics_evaluation_agent_config.py`
|
||||
- Modify: `scripts/test_io_definition_agent_config.py`
|
||||
- Modify: `scripts/test_implementation_planning_agent_config.py`
|
||||
- Modify: `scripts/test_requirement_agent_config.py`
|
||||
- Modify: `scripts/test_release_agent_config.py`
|
||||
|
||||
- [ ] **Step 1: Replace reference-HDF5 expectations in reference model tests**
|
||||
|
||||
In `scripts/test_reference_model_agent_config.py`, change the artifact contract expectations from `reference.h5` and nested `csv/` files to the flat user-provided structure.
|
||||
|
||||
Use assertions equivalent to:
|
||||
|
||||
```python
|
||||
for required_text in (
|
||||
"FESA reference models use Abaqus input files.",
|
||||
"reference/<model-id>/",
|
||||
"model.inp",
|
||||
"metadata.json",
|
||||
"<model-id>_displacements.csv",
|
||||
"<model-id>_reactions.csv",
|
||||
"<model-id>_internalforces.csv",
|
||||
"<model-id>_stresses.csv",
|
||||
):
|
||||
self.assertIn(required_text, instructions)
|
||||
|
||||
self.assertNotIn("reference.h5", instructions)
|
||||
self.assertNotIn("references/<feature-id>/<model-id>/", instructions)
|
||||
```
|
||||
|
||||
Change the boundary expectation from:
|
||||
|
||||
```python
|
||||
"Do not generate reference HDF5 files or deterministic CSV views.",
|
||||
```
|
||||
|
||||
to:
|
||||
|
||||
```python
|
||||
"Do not generate or modify Abaqus reference CSV files.",
|
||||
```
|
||||
|
||||
- [ ] **Step 2: Replace reference-HDF5 expectations in reference verification tests**
|
||||
|
||||
In `scripts/test_reference_verification_agent_config.py`, assert that the agent compares FESA HDF5 to Abaqus reference CSV:
|
||||
|
||||
```python
|
||||
for required_text in (
|
||||
"results.h5",
|
||||
"Abaqus reference CSV",
|
||||
"reference/<model-id>/",
|
||||
"<model-id>_displacements.csv",
|
||||
"<model-id>_reactions.csv",
|
||||
"<model-id>_internalforces.csv",
|
||||
"<model-id>_stresses.csv",
|
||||
"metadata.json",
|
||||
):
|
||||
self.assertIn(required_text, instructions)
|
||||
|
||||
self.assertNotIn("reference.h5", instructions)
|
||||
self.assertNotIn("stored reference HDF5", instructions)
|
||||
```
|
||||
|
||||
Keep output section assertions for `Artifact Inventory`, `Comparison Contract`, `Quantity Results`, `Failure Classification`, `Handoff Recommendation`, and `No-Change Assertion`.
|
||||
|
||||
- [ ] **Step 3: Update solver skill contract tests**
|
||||
|
||||
In `scripts/test_fesa_solver_skills.py`, update the `fesa-reference-models` `body_terms` to:
|
||||
|
||||
```python
|
||||
"reference/<model-id>/",
|
||||
"model.inp",
|
||||
"metadata.json",
|
||||
"<model-id>_displacements.csv",
|
||||
"<model-id>_reactions.csv",
|
||||
"<model-id>_internalforces.csv",
|
||||
"<model-id>_stresses.csv",
|
||||
"Coverage Matrix",
|
||||
"Do not generate or modify Abaqus reference CSV files.",
|
||||
```
|
||||
|
||||
Update the `fesa-reference-comparison` `body_terms` to:
|
||||
|
||||
```python
|
||||
"docs/reference-verifications/<feature-id>-reference-verification.md",
|
||||
"ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT",
|
||||
"results.h5",
|
||||
"Abaqus reference CSV",
|
||||
"reference/<model-id>/",
|
||||
"<model-id>_displacements.csv",
|
||||
"<model-id>_reactions.csv",
|
||||
"<model-id>_internalforces.csv",
|
||||
"<model-id>_stresses.csv",
|
||||
"max absolute error",
|
||||
"max relative error",
|
||||
"RMS error",
|
||||
"missing rows",
|
||||
"extra rows",
|
||||
"pass-for-physics-evaluation",
|
||||
"Do not change tolerance policies.",
|
||||
```
|
||||
|
||||
Keep `HDF5` in the description terms for FESA output. Replace `CSV view` description terms with `CSV` or `reference CSV` where the old phrase implies a reference HDF5-derived view.
|
||||
|
||||
- [ ] **Step 4: Update shared boundary tests**
|
||||
|
||||
For each affected `scripts/test_*_agent_config.py`, replace the old boundary assertion:
|
||||
|
||||
```python
|
||||
"Do not generate reference HDF5 files or deterministic CSV views.",
|
||||
```
|
||||
|
||||
with:
|
||||
|
||||
```python
|
||||
"Do not generate or modify Abaqus reference CSV files.",
|
||||
```
|
||||
|
||||
Use this only for agents whose scope mentions reference artifacts. Do not add the phrase to unrelated tests unless the corresponding agent config already carries a reference artifact boundary.
|
||||
|
||||
- [ ] **Step 5: Run the updated tests and confirm RED**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
python -m unittest scripts.test_reference_model_agent_config scripts.test_reference_verification_agent_config scripts.test_fesa_solver_skills -v
|
||||
```
|
||||
|
||||
Expected: FAIL. Failures should point to missing `reference/<model-id>/`, missing `<model-id>_internalforces.csv`, or stale `reference.h5` text in active contracts.
|
||||
|
||||
Commit after this task only if using a clean branch:
|
||||
|
||||
```powershell
|
||||
git add scripts/test_fesa_solver_skills.py scripts/test_reference_model_agent_config.py scripts/test_reference_verification_agent_config.py scripts/test_physics_evaluation_agent_config.py scripts/test_io_definition_agent_config.py scripts/test_implementation_planning_agent_config.py scripts/test_requirement_agent_config.py scripts/test_release_agent_config.py
|
||||
git commit -m "test: redefine reference comparison contract"
|
||||
```
|
||||
|
||||
### Task 2: Update Project-Level Documentation
|
||||
|
||||
**Files:**
|
||||
- Modify: `AGENTS.md`
|
||||
- Modify: `docs/ProjectInitialPlanNote.md`
|
||||
- Modify: `docs/PRD.md`
|
||||
- Modify: `docs/ARCHITECTURE.md`
|
||||
- Modify: `docs/ADR.md`
|
||||
|
||||
- [ ] **Step 1: Update `AGENTS.md` project identity**
|
||||
|
||||
Replace the current reference comparison statement with:
|
||||
|
||||
```markdown
|
||||
- 공식 solver output은 HDF5 `results.h5`이다.
|
||||
- reference 결과는 FESA와 같은 Abaqus `.inp` 모델을 Abaqus로 해석해 생성한 CSV 파일이다.
|
||||
- reference comparison은 FESA `results.h5`의 변위, 반력, 내력, 응력 dataset을 `reference/<model-id>/<model-id>_*.csv` 파일과 비교한다.
|
||||
- CSV는 FESA 공식 output이 아니며, FESA HDF5에서 추출한 deterministic CSV view는 비교 디버깅/검토용 보조 artifact로만 둔다.
|
||||
```
|
||||
|
||||
Replace any active `references/<feature-id>/<model-id>/` reference artifact examples with:
|
||||
|
||||
```text
|
||||
reference/<model-id>/<model-id>_displacements.csv
|
||||
reference/<model-id>/<model-id>_reactions.csv
|
||||
reference/<model-id>/<model-id>_internalforces.csv
|
||||
reference/<model-id>/<model-id>_stresses.csv
|
||||
```
|
||||
|
||||
- [ ] **Step 2: Update `docs/ProjectInitialPlanNote.md`**
|
||||
|
||||
Revise the section currently stating that `reference.h5` is the stored authoritative reference. The replacement must say:
|
||||
|
||||
```markdown
|
||||
## HDF5 결과와 Abaqus reference CSV 비교 결정
|
||||
|
||||
FESA solver의 공식 해석 결과는 `results.h5` HDF5 파일이다. Reference 결과는 동일한 Abaqus `.inp` 모델을 Abaqus에서 해석해 추출한 CSV 파일이며, `reference/<model-id>/` 아래에 물리량별 파일로 저장한다.
|
||||
|
||||
Reference comparison은 FESA HDF5 dataset을 deterministic row record로 읽어 `reference/<model-id>/<model-id>_displacements.csv`, `<model-id>_reactions.csv`, `<model-id>_internalforces.csv`, `<model-id>_stresses.csv`와 직접 비교한다.
|
||||
```
|
||||
|
||||
- [ ] **Step 3: Update PRD/architecture/ADR**
|
||||
|
||||
Ensure the active decision in `docs/PRD.md`, `docs/ARCHITECTURE.md`, and `docs/ADR.md` contains these three facts:
|
||||
|
||||
```markdown
|
||||
- FESA solver writes `results.h5`.
|
||||
- Abaqus reference results are CSV files under `reference/<model-id>/`.
|
||||
- Verification compares FESA HDF5 rows with Abaqus reference CSV rows using documented IDs, components, units, coordinate system, step/frame identity, and tolerance.
|
||||
```
|
||||
|
||||
Remove or rewrite claims that `reference.h5` is required or that reference CSV files are generated from reference HDF5.
|
||||
|
||||
- [ ] **Step 4: Run targeted stale-text check**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
rg -n "reference\.h5|stored reference HDF5|results\.h5.*reference\.h5|derived from reference\.h5|references/<feature-id>/<model-id>/" AGENTS.md docs\ProjectInitialPlanNote.md docs\PRD.md docs\ARCHITECTURE.md docs\ADR.md
|
||||
```
|
||||
|
||||
Expected: no matches in these active project-level docs.
|
||||
|
||||
Commit:
|
||||
|
||||
```powershell
|
||||
git add AGENTS.md docs/ProjectInitialPlanNote.md docs/PRD.md docs/ARCHITECTURE.md docs/ADR.md
|
||||
git commit -m "docs: define HDF5 to reference CSV comparison"
|
||||
```
|
||||
|
||||
### Task 3: Update Reference Model Contracts
|
||||
|
||||
**Files:**
|
||||
- Modify: `docs/reference-models/README.md`
|
||||
- Modify: `.codex/skills/fesa-reference-models/SKILL.md`
|
||||
- Modify: `.codex/skills/fesa-reference-models/agents/openai.yaml`
|
||||
- Modify: `.codex/agents/reference-model-agent.toml`
|
||||
|
||||
- [ ] **Step 1: Rewrite the artifact bundle structure**
|
||||
|
||||
Use this structure in all four files:
|
||||
|
||||
```text
|
||||
reference/
|
||||
<model-id>/
|
||||
model.inp
|
||||
metadata.json
|
||||
<model-id>_displacements.csv
|
||||
<model-id>_reactions.csv
|
||||
<model-id>_internalforces.csv
|
||||
<model-id>_stresses.csv
|
||||
README.md
|
||||
```
|
||||
|
||||
Optional files:
|
||||
|
||||
```text
|
||||
<model-id>_strains.csv
|
||||
<model-id>_energy_or_residual.csv
|
||||
<model-id>_<quantity>.csv
|
||||
notes.md
|
||||
```
|
||||
|
||||
- [ ] **Step 2: Rename the reference result section**
|
||||
|
||||
Change headings and output contracts from `Reference HDF5 and CSV View Requirements` to:
|
||||
|
||||
```markdown
|
||||
## Abaqus Reference CSV Requirements
|
||||
```
|
||||
|
||||
For `docs/reference-models/README.md`, include this exact required-file wording:
|
||||
|
||||
```markdown
|
||||
- `<model-id>_displacements.csv`: required when nodal displacement is a verification quantity.
|
||||
- `<model-id>_reactions.csv`: required when constrained DOF reactions or global equilibrium are verification quantities.
|
||||
- `<model-id>_internalforces.csv`: required when element internal force is a verification quantity.
|
||||
- `<model-id>_stresses.csv`: required when stress is a verification quantity.
|
||||
```
|
||||
|
||||
- [ ] **Step 3: Update metadata contract**
|
||||
|
||||
Replace reference HDF5 metadata fields with CSV/reference provenance fields:
|
||||
|
||||
```json
|
||||
{
|
||||
"feature_id": "<feature-id>",
|
||||
"model_id": "<model-id>",
|
||||
"artifact_status": "draft | needs-reference-artifacts | ready-for-implementation-planning | blocked",
|
||||
"input_file": "model.inp",
|
||||
"abaqus_version": "<version or needs-user-decision>",
|
||||
"generation_owner": "<person/procedure>",
|
||||
"generation_date": "<YYYY-MM-DD>",
|
||||
"source_documents": ["docs/requirements/<feature-id>.md"],
|
||||
"units": "<unit system>",
|
||||
"coordinate_system": "global Cartesian unless otherwise documented",
|
||||
"analysis_type": "<analysis type>",
|
||||
"element_types": ["<Abaqus element type>"],
|
||||
"material_values": {},
|
||||
"boundary_condition_summary": "<summary>",
|
||||
"load_summary": "<summary>",
|
||||
"output_requests": ["U", "RF", "S", "<feature-specific quantities>"],
|
||||
"reference_csv_schema_version": "<version>",
|
||||
"reference_csv_files": [
|
||||
"<model-id>_displacements.csv",
|
||||
"<model-id>_reactions.csv",
|
||||
"<model-id>_internalforces.csv",
|
||||
"<model-id>_stresses.csv"
|
||||
],
|
||||
"tolerance_policy": "<absolute/relative/norm policy>",
|
||||
"limitations": ["<known limitation>"]
|
||||
}
|
||||
```
|
||||
|
||||
- [ ] **Step 4: Update coverage matrix**
|
||||
|
||||
Change coverage matrix columns from `hdf5_dataset` and `csv_view` to:
|
||||
|
||||
```markdown
|
||||
| requirement_id | model_id | compared_quantity | fesa_hdf5_dataset | reference_csv | tolerance | verification_method | status |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| <req-id> | <model-id> | displacement | /steps/<step>/frames/<frame>/field_outputs/U | reference/<model-id>/<model-id>_displacements.csv | <policy> | hdf5-to-reference-csv | draft |
|
||||
| <req-id> | <model-id> | reaction | /steps/<step>/frames/<frame>/field_outputs/RF | reference/<model-id>/<model-id>_reactions.csv | <policy> | hdf5-to-reference-csv | draft |
|
||||
| <req-id> | <model-id> | internal force | /steps/<step>/frames/<frame>/field_outputs/element_forces | reference/<model-id>/<model-id>_internalforces.csv | <policy> | hdf5-to-reference-csv | draft |
|
||||
| <req-id> | <model-id> | stress | /steps/<step>/frames/<frame>/field_outputs/S | reference/<model-id>/<model-id>_stresses.csv | <policy> | hdf5-to-reference-csv | draft |
|
||||
```
|
||||
|
||||
- [ ] **Step 5: Verify Task 3 tests**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
python -m unittest scripts.test_reference_model_agent_config scripts.test_fesa_solver_skills -v
|
||||
```
|
||||
|
||||
Expected: reference model tests PASS; reference comparison skill tests may still fail until Task 4.
|
||||
|
||||
Commit:
|
||||
|
||||
```powershell
|
||||
git add docs/reference-models/README.md .codex/skills/fesa-reference-models/SKILL.md .codex/skills/fesa-reference-models/agents/openai.yaml .codex/agents/reference-model-agent.toml
|
||||
git commit -m "docs: update reference model CSV artifact contract"
|
||||
```
|
||||
|
||||
### Task 4: Update Reference Verification Contracts
|
||||
|
||||
**Files:**
|
||||
- Modify: `docs/reference-verifications/README.md`
|
||||
- Modify: `.codex/skills/fesa-reference-comparison/SKILL.md`
|
||||
- Modify: `.codex/skills/fesa-reference-comparison/agents/openai.yaml`
|
||||
- Modify: `.codex/agents/reference-verification-agent.toml`
|
||||
|
||||
- [ ] **Step 1: Rewrite the mission**
|
||||
|
||||
Use this comparison statement:
|
||||
|
||||
```markdown
|
||||
Reference Verification Agent는 Build/Test Executor Agent 통과 후 generated solver `results.h5`와 Abaqus reference CSV files를 tolerance 기준으로 비교한다. Reference CSV는 동일한 Abaqus `.inp` 모델을 Abaqus로 해석해 추출한 변위, 반력, 내력, 응력 결과이며, FESA HDF5 dataset에서 파생된 파일이 아니다.
|
||||
```
|
||||
|
||||
- [ ] **Step 2: Update artifact check**
|
||||
|
||||
Artifact check must require:
|
||||
|
||||
```markdown
|
||||
- `metadata.json`
|
||||
- `model.inp`
|
||||
- generated solver `results.h5`
|
||||
- `reference/<model-id>/<model-id>_displacements.csv`
|
||||
- `reference/<model-id>/<model-id>_reactions.csv`
|
||||
- `reference/<model-id>/<model-id>_internalforces.csv`
|
||||
- `reference/<model-id>/<model-id>_stresses.csv`
|
||||
- reference CSV schema version
|
||||
- FESA HDF5 schema version
|
||||
- units
|
||||
- coordinate system
|
||||
- step/frame identity
|
||||
- node/element ID matching rule
|
||||
- output location
|
||||
- component naming
|
||||
- tolerance policy
|
||||
```
|
||||
|
||||
- [ ] **Step 3: Update comparison targets**
|
||||
|
||||
Replace authoritative HDF5-vs-HDF5 rows with:
|
||||
|
||||
```markdown
|
||||
| quantity | fesa_hdf5_dataset | reference_csv |
|
||||
| --- | --- | --- |
|
||||
| displacement | /steps/<step>/frames/<frame>/field_outputs/U | reference/<model-id>/<model-id>_displacements.csv |
|
||||
| reaction | /steps/<step>/frames/<frame>/field_outputs/RF | reference/<model-id>/<model-id>_reactions.csv |
|
||||
| internal force | /steps/<step>/frames/<frame>/field_outputs/element_forces | reference/<model-id>/<model-id>_internalforces.csv |
|
||||
| stress | /steps/<step>/frames/<frame>/field_outputs/S | reference/<model-id>/<model-id>_stresses.csv |
|
||||
```
|
||||
|
||||
- [ ] **Step 4: Update report template**
|
||||
|
||||
Change `Artifact Inventory` rows to:
|
||||
|
||||
```markdown
|
||||
| item | path | status | notes |
|
||||
| --- | --- | --- | --- |
|
||||
| reference_model_dir | reference/<model-id>/ | present | missing | <notes> |
|
||||
| reference_input | reference/<model-id>/model.inp | present | missing | <input summary> |
|
||||
| metadata | reference/<model-id>/metadata.json | present | missing | <provenance summary> |
|
||||
| reference_displacements_csv | reference/<model-id>/<model-id>_displacements.csv | present | missing | <row/schema summary> |
|
||||
| reference_reactions_csv | reference/<model-id>/<model-id>_reactions.csv | present | missing | <row/schema summary> |
|
||||
| reference_internalforces_csv | reference/<model-id>/<model-id>_internalforces.csv | present | missing | <row/schema summary> |
|
||||
| reference_stresses_csv | reference/<model-id>/<model-id>_stresses.csv | present | missing | <row/schema summary> |
|
||||
| solver_hdf5 | <solver output directory>/results.h5 | present | missing | <schema summary> |
|
||||
| solver_debug_csv_view | <solver output directory>/csv/ | present | missing | <optional, derived from results.h5 only> |
|
||||
```
|
||||
|
||||
Change `Quantity Results` columns to:
|
||||
|
||||
```markdown
|
||||
| quantity | model_id | fesa_hdf5_dataset | reference_csv | compared_rows | missing_rows | extra_rows | max_abs_error | max_rel_error | rms_error | norm_error | worst_id | worst_component | result |
|
||||
```
|
||||
|
||||
- [ ] **Step 5: Update skill and UI metadata prompts**
|
||||
|
||||
Set `.codex/skills/fesa-reference-comparison/agents/openai.yaml` default prompt to:
|
||||
|
||||
```yaml
|
||||
default_prompt: "Use $fesa-reference-comparison to compare FESA solver results.h5 against Abaqus reference CSV files."
|
||||
```
|
||||
|
||||
The skill `description` should include:
|
||||
|
||||
```text
|
||||
FESA solver HDF5 results against Abaqus reference CSV files
|
||||
```
|
||||
|
||||
- [ ] **Step 6: Verify Task 4 tests**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
python -m unittest scripts.test_reference_verification_agent_config scripts.test_fesa_solver_skills -v
|
||||
```
|
||||
|
||||
Expected: PASS.
|
||||
|
||||
Commit:
|
||||
|
||||
```powershell
|
||||
git add docs/reference-verifications/README.md .codex/skills/fesa-reference-comparison/SKILL.md .codex/skills/fesa-reference-comparison/agents/openai.yaml .codex/agents/reference-verification-agent.toml
|
||||
git commit -m "docs: compare solver HDF5 with Abaqus reference CSV"
|
||||
```
|
||||
|
||||
### Task 5: Update Upstream and Downstream Workflow Docs
|
||||
|
||||
**Files:**
|
||||
- Modify: `docs/SOLVER_AGENT_DESIGN.md`
|
||||
- Modify: `docs/SOLVER_SKILL_DESIGN.md`
|
||||
- Modify: `docs/io-definitions/README.md`
|
||||
- Modify: `docs/implementation-plans/README.md`
|
||||
- Modify: `docs/physics-evaluations/README.md`
|
||||
- Modify: `docs/requirements/README.md`
|
||||
- Modify: `.codex/skills/fesa-io-contract/SKILL.md`
|
||||
- Modify: `.codex/skills/fesa-physics-sanity/SKILL.md`
|
||||
- Modify: `.codex/skills/fesa-cpp-msvc-tdd/SKILL.md`
|
||||
- Modify: `.codex/skills/fesa-release-readiness/SKILL.md`
|
||||
- Modify: `.codex/skills/fesa-requirements-baseline/SKILL.md`
|
||||
- Modify: `.codex/agents/io-definition-agent.toml`
|
||||
- Modify: `.codex/agents/implementation-planning-agent.toml`
|
||||
- Modify: `.codex/agents/implementation-agent.toml`
|
||||
- Modify: `.codex/agents/physics-evaluation-agent.toml`
|
||||
- Modify: `.codex/agents/release-agent.toml`
|
||||
- Modify: `.codex/agents/requirement-agent.toml`
|
||||
- Modify: `.codex/agents/coordinator-agent.toml`
|
||||
|
||||
- [ ] **Step 1: Update I/O contract wording**
|
||||
|
||||
Keep FESA `results.h5` authoritative. Reframe CSV schema sections as comparison row schema, not reference HDF5-derived view:
|
||||
|
||||
```markdown
|
||||
## FESA HDF5 to Reference CSV Comparison Schema
|
||||
|
||||
FESA solver output is `results.h5`. Comparison tooling reads required HDF5 datasets and maps them to deterministic row records that can be matched against Abaqus reference CSV files under `reference/<model-id>/`.
|
||||
```
|
||||
|
||||
Use `reference_csv_schema_version` for reference CSV contracts and `hdf5_schema_version` for FESA output contracts.
|
||||
|
||||
- [ ] **Step 2: Update implementation planning data flow**
|
||||
|
||||
Change data-flow contract to:
|
||||
|
||||
```markdown
|
||||
1. Abaqus `.inp` input follows docs/io-definitions/<feature-id>-io.md.
|
||||
2. Parser/I/O path maps model data and history data into the internal semantic model.
|
||||
3. Solver path produces authoritative `results.h5` with displacement, reaction, internal force, stress, or feature-specific result datasets.
|
||||
4. Reference artifacts are Abaqus-generated CSV files under `reference/<model-id>/`.
|
||||
5. Reference comparison tests compare FESA `results.h5` rows against `reference/<model-id>/<model-id>_*.csv` rows.
|
||||
```
|
||||
|
||||
- [ ] **Step 3: Update physics evidence inventory**
|
||||
|
||||
Change physics evidence references from solver/reference HDF5 to:
|
||||
|
||||
```markdown
|
||||
- checked solver HDF5 file: `<solver output directory>/results.h5`
|
||||
- checked Abaqus reference CSV files under `reference/<model-id>/`
|
||||
- optional FESA deterministic CSV view derived from `results.h5` for review only
|
||||
```
|
||||
|
||||
Artifact inventory should not include `reference_hdf5`.
|
||||
|
||||
- [ ] **Step 4: Update global agent/skill boundary text**
|
||||
|
||||
Replace stale boundary sentences with:
|
||||
|
||||
```text
|
||||
Do not generate or modify Abaqus reference CSV files.
|
||||
```
|
||||
|
||||
For agents that mention deterministic CSV views derived from FESA HDF5, use:
|
||||
|
||||
```text
|
||||
Do not treat FESA debug CSV views as authoritative solver output or reference artifacts.
|
||||
```
|
||||
|
||||
Only add the second sentence where the agent actually discusses debug/exported FESA CSV views.
|
||||
|
||||
- [ ] **Step 5: Verify upstream/downstream tests**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
python -m unittest scripts.test_io_definition_agent_config scripts.test_implementation_planning_agent_config scripts.test_physics_evaluation_agent_config scripts.test_requirement_agent_config scripts.test_release_agent_config -v
|
||||
```
|
||||
|
||||
Expected: PASS.
|
||||
|
||||
Commit:
|
||||
|
||||
```powershell
|
||||
git add docs/SOLVER_AGENT_DESIGN.md docs/SOLVER_SKILL_DESIGN.md docs/io-definitions/README.md docs/implementation-plans/README.md docs/physics-evaluations/README.md docs/requirements/README.md .codex/skills/fesa-io-contract/SKILL.md .codex/skills/fesa-physics-sanity/SKILL.md .codex/skills/fesa-cpp-msvc-tdd/SKILL.md .codex/skills/fesa-release-readiness/SKILL.md .codex/skills/fesa-requirements-baseline/SKILL.md .codex/agents/io-definition-agent.toml .codex/agents/implementation-planning-agent.toml .codex/agents/implementation-agent.toml .codex/agents/physics-evaluation-agent.toml .codex/agents/release-agent.toml .codex/agents/requirement-agent.toml .codex/agents/coordinator-agent.toml
|
||||
git commit -m "docs: align workflow agents with reference CSV artifacts"
|
||||
```
|
||||
|
||||
### Task 6: Add Stale Contract Guard
|
||||
|
||||
**Files:**
|
||||
- Modify: `scripts/test_fesa_solver_skills.py`
|
||||
|
||||
- [ ] **Step 1: Add a stale phrase scanner for active contract files**
|
||||
|
||||
Add this test to `scripts/test_fesa_solver_skills.py`:
|
||||
|
||||
```python
|
||||
ACTIVE_CONTRACT_FILES = (
|
||||
ROOT / "AGENTS.md",
|
||||
ROOT / "docs" / "ProjectInitialPlanNote.md",
|
||||
ROOT / "docs" / "PRD.md",
|
||||
ROOT / "docs" / "ARCHITECTURE.md",
|
||||
ROOT / "docs" / "ADR.md",
|
||||
ROOT / "docs" / "SOLVER_AGENT_DESIGN.md",
|
||||
ROOT / "docs" / "SOLVER_SKILL_DESIGN.md",
|
||||
ROOT / "docs" / "reference-models" / "README.md",
|
||||
ROOT / "docs" / "reference-verifications" / "README.md",
|
||||
ROOT / "docs" / "io-definitions" / "README.md",
|
||||
ROOT / "docs" / "implementation-plans" / "README.md",
|
||||
ROOT / "docs" / "physics-evaluations" / "README.md",
|
||||
ROOT / "docs" / "requirements" / "README.md",
|
||||
ROOT / ".codex" / "agents" / "reference-model-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "reference-verification-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "io-definition-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "implementation-planning-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "implementation-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "physics-evaluation-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "release-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "requirement-agent.toml",
|
||||
ROOT / ".codex" / "agents" / "coordinator-agent.toml",
|
||||
ROOT / ".codex" / "skills" / "fesa-reference-models" / "SKILL.md",
|
||||
ROOT / ".codex" / "skills" / "fesa-reference-comparison" / "SKILL.md",
|
||||
ROOT / ".codex" / "skills" / "fesa-io-contract" / "SKILL.md",
|
||||
ROOT / ".codex" / "skills" / "fesa-physics-sanity" / "SKILL.md",
|
||||
ROOT / ".codex" / "skills" / "fesa-cpp-msvc-tdd" / "SKILL.md",
|
||||
ROOT / ".codex" / "skills" / "fesa-release-readiness" / "SKILL.md",
|
||||
ROOT / ".codex" / "skills" / "fesa-requirements-baseline" / "SKILL.md",
|
||||
)
|
||||
|
||||
STALE_REFERENCE_CONTRACT_PHRASES = (
|
||||
"reference.h5",
|
||||
"stored reference HDF5",
|
||||
"reference HDF5 artifact",
|
||||
"results.h5 and reference.h5",
|
||||
"results.h5` and `reference.h5",
|
||||
"derived from reference.h5",
|
||||
"references/<feature-id>/<model-id>/",
|
||||
)
|
||||
|
||||
def test_active_contracts_do_not_require_reference_hdf5(self):
|
||||
for path in ACTIVE_CONTRACT_FILES:
|
||||
with self.subTest(path=str(path.relative_to(ROOT))):
|
||||
text = path.read_text(encoding="utf-8")
|
||||
for stale_phrase in STALE_REFERENCE_CONTRACT_PHRASES:
|
||||
self.assertNotIn(stale_phrase, text)
|
||||
```
|
||||
|
||||
This intentionally excludes `docs/superpowers/plans/` so old implementation plans remain historical records.
|
||||
|
||||
- [ ] **Step 2: Verify stale guard catches active contract drift**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
python -m unittest scripts.test_fesa_solver_skills.FesaSolverSkillTests.test_active_contracts_do_not_require_reference_hdf5 -v
|
||||
```
|
||||
|
||||
Expected: PASS.
|
||||
|
||||
Commit:
|
||||
|
||||
```powershell
|
||||
git add scripts/test_fesa_solver_skills.py
|
||||
git commit -m "test: guard against reference HDF5 contract drift"
|
||||
```
|
||||
|
||||
### Task 7: Full Verification
|
||||
|
||||
**Files:**
|
||||
- No new edits expected.
|
||||
|
||||
- [ ] **Step 1: Run all Python contract tests**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
python -m unittest discover -s scripts -p "test_*.py"
|
||||
```
|
||||
|
||||
Expected: PASS.
|
||||
|
||||
- [ ] **Step 2: Run workspace validation**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
python scripts/validate_workspace.py
|
||||
```
|
||||
|
||||
Expected: exit code 0. If no C++ targets exist, the current acceptable message is:
|
||||
|
||||
```text
|
||||
No C++ validation commands configured.
|
||||
Add CMakeLists.txt or set HARNESS_VALIDATION_COMMANDS.
|
||||
```
|
||||
|
||||
- [ ] **Step 3: Run manual stale-text audit across active files**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
rg -n "reference\.h5|stored reference HDF5|reference HDF5 artifact|results\.h5.*reference\.h5|derived from reference\.h5|references/<feature-id>/<model-id>/" AGENTS.md docs .codex scripts
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- No matches in active docs, active skills, active agents, or tests.
|
||||
- Matches are acceptable only in `docs/superpowers/plans/` historical plan files if they document old work.
|
||||
|
||||
- [ ] **Step 4: Review final diff**
|
||||
|
||||
Run:
|
||||
|
||||
```powershell
|
||||
git diff --stat
|
||||
git diff --check
|
||||
```
|
||||
|
||||
Expected: no whitespace errors. Review that every changed file traces to replacing the old `reference.h5`/reference-HDF5 premise with FESA-HDF5-to-Abaqus-reference-CSV comparison.
|
||||
|
||||
Commit:
|
||||
|
||||
```powershell
|
||||
git add AGENTS.md docs .codex scripts
|
||||
git commit -m "docs: finalize reference CSV comparison contract"
|
||||
```
|
||||
|
||||
## Completion Criteria
|
||||
|
||||
- Active contracts say FESA solver output is HDF5 `results.h5`.
|
||||
- Active contracts say Abaqus reference output is CSV under `reference/<model-id>/`.
|
||||
- Active contracts compare FESA HDF5 directly with reference CSV files for displacement, reaction, internal force, and stress.
|
||||
- Active contracts state the reference CSVs come from Abaqus solving the same Abaqus `.inp` model used by FESA.
|
||||
- `reference.h5` is not required anywhere in active docs, skills, agents, or contract tests.
|
||||
- Python tests and workspace validation pass.
|
||||
|
||||
Reference in New Issue
Block a user