---
name: fesa-io-contract
description: Use when defining FESA solver I/O contracts, Abaqus .inp keyword subsets, internal model mapping, validation rules, HDF5 result schemas, and reference CSV comparison row schemas.
---

# FESA I/O Contract

Use this skill to define exactly what input and output data the solver feature accepts and produces.

## Inputs

Read these first:

- `AGENTS.md`
- `docs/SOLVER_AGENT_DESIGN.md`
- `docs/io-definitions/README.md`
- `docs/requirements/<feature-id>.md`
- `docs/formulations/<feature-id>-formulation.md`
- Numerical review and reference model documents when present

## Workflow

1. Define Abaqus Input Scope for the feature-specific `.inp` subset.
2. Define Syntax Policy for keyword lines, data lines, comments, unsupported keywords, and diagnostics.
3. Separate Model Data Mapping from History Data Mapping.
4. Define supported keywords such as `*NODE`, `*ELEMENT`, `*MATERIAL`, `*ELASTIC`, `*BOUNDARY`, `*CLOAD`, `*STEP`, `*OUTPUT`, `*NODE OUTPUT`, and `*ELEMENT OUTPUT` only when required.
5. Define Internal Model Contract at a semantic level without C++ APIs.
6. Define Output HDF5 Schema for authoritative solver output `results.h5`.
7. Define only the FESA HDF5 projection and minimum source-ID/component mapping needed for
   feature-declared blocking or warning-only CSV quantities.
8. Define solver HDF5 units, coordinates, component names, locations, and step/frame identity.
   Do not require duplicated CSV metadata or a CSV schema version for a single-step final-frame case.
9. Define validation rules and open issues.

## Output Contract

Produce or revise `docs/io-definitions/<feature-id>-io.md` with:

- Abaqus Input Scope
- Syntax Policy
- Model Data Mapping
- History Data Mapping
- Internal Model Contract
- Output HDF5 Schema
- FESA HDF5 to Reference CSV Comparison Mapping
- Validation Rules
- Downstream Handoff

## Boundaries

- Do not implement parsers.
- Do not design C++ APIs.
- Do not claim full Abaqus compatibility.
- Do not run Abaqus, Nastran, or any reference solver.
- Do not generate or modify Abaqus reference CSV files.
- Do not approve release readiness.

## Quality Gate

- Every supported keyword has a documented purpose, required data, and unsupported-case behavior.
- HDF5 schema is the authoritative solver output contract and must carry schema version, step/frame identity, units, coordinate system, output location, and component naming.
- Reference comparison must define exact existing CSV paths, source-ID and component columns,
  deterministic matching, and missing/extra/duplicate/nonfinite prechecks. Never match by row order alone.
- Unsupported Abaqus input is explicit: unsupported, ignored-with-warning, or requires user decision.
- The I/O contract is compatible with requirements, formulation, and reference comparison needs.

## Handoff

Send keyword and schema contracts to Reference Model Agent and Implementation Planning Agent. Send HDF5 dataset paths, reference CSV row schemas, ID matching, and tolerance-source constraints to Reference Verification Agent.
