7.4 KiB
name, description
| name | description |
|---|---|
| fesa-cpp-msvc-tdd | Use when planning, implementing, build/testing, correcting, or reference-comparing FESA solver C++17 MSVC CMake CTest work with TDD. |
FESA C++ MSVC TDD
Use this skill to keep FESA C++ implementation, build/test reporting, correction, and reference comparison test-first, MSVC-compatible, and bounded by approved upstream contracts.
Inputs
Read these first:
AGENTS.mddocs/SOLVER_AGENT_DESIGN.mddocs/HARNESS.mddocs/HARNESS_WORKFLOW.mddocs/<feature-id>/implementation-plan.mddocs/<feature-id>/implementation-report.mdwhen presentdocs/<feature-id>/build-test.mdwhen presentdocs/<feature-id>/reference-comparison.mdwhen present- Related requirements, formulation, numerical review, I/O definition, and reference model documents
- Generated FESA
results.h5and the exact feature-declared reference.inpand Abaqus CSV paths
For Harness implementation, also read .agents/skills/harness/SKILL.md,
.codex/hooks.json, the materialized phase indexes, and the Executor-selected current
stepN.md.
Workflow
- For planning, use the project-local
harnessskill to convert upstream documents into a user-approved multi-Step draft. Materialize only planning files after approval; planning never selects or runs a Step. Runscripts/execute.pyonly after a separate explicit user request. - For implementation, require the approved plan, materialized phase files, and the
Executor-selected current
stepN.md. Do not start another pending Step. - Execute the current Step as
RED -> observed failure -> minimal GREEN -> focused/full VERIFY. Update only its Codex-ownedstatusplussummary,error_message, orblocked_reason. The Executor owns branch, pending-Step selection, retry, timestamps, commits, advancement, and top-level phase status. - Hooks are automatic through
.codex/hooks.json: PreToolUse intercepts before edits and Stop performs whole-project validation. Do not manually run their entry points as substitutes. - RED: write the planned unit, integration, parser/I/O, or reference-comparison test first.
- RED: run the targeted test and verify the expected failure before production code.
- GREEN: implement the minimum C++17/MSVC-compatible code needed for the task.
- VERIFY: resolve commands from
.harness/config.jsonfirst, then Harness defaults; run the targeted command, then the full MSVC x64 Debug build/test commands in order. - For C++ production changes, require a related C++ test file in the same patch or already present.
- Treat PreToolUse as a test-file-existence guardrail, not proof that RED was observed. Record the RED and GREEN commands and results in the implementation report.
- Let Stop perform the final whole-project MSVC build/test before the Step ends.
- Record every build/test command, exit code, duration, stdout/stderr tail, failed test names, environment, and project-selection path. Stop after the first decisive failure unless the implementation plan requires another diagnostic command.
- For failure triage, classify as
configure | compile | link | test | reference-comparison | harness | environment | upstream-contract. - Run reference verification in this literal order:
ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT. - ARTIFACT CHECK requires exact declared input/CSV paths, generated
results.h5, theio.mdHDF5 projection, source identity/component matching, row uniqueness/finite checks, and approved tolerance. - COMPARE matches HDF5 and CSV rows by declared source identity and component, never by row order. Reject missing, extra, duplicate, and nonfinite required rows before tolerance; preserve warning-only behavior.
- Fix implementation-owned failures only and keep changes traceable to the implementation plan.
Output Contract
Produce the applicable feature-bundled evidence:
docs/<feature-id>/implementation-plan.mddocs/<feature-id>/implementation-report.mddocs/<feature-id>/build-test.mddocs/<feature-id>/reference-comparison.mddocs/<feature-id>/corrections.md
implementation-report.md records RED/GREEN/VERIFY evidence. build-test.md uses
owner_agent: implementation-agent and records the historical build/test sections: metadata,
execution environment, command-log summary, validation results, failure classification, failed
test inventory, handoff recommendation, no-change assertion, and open issues.
reference-comparison.md records the exact input/CSV artifact inventory, results.h5, HDF5
projection, source-ID/component matching, row prechecks, approved tolerance, per-quantity
per-row decisions, max absolute error, max relative or component-normalized error, RMS error,
norm error where the approved feature contract makes each metric applicable, classification,
handoff, no-change assertion, and open issues.
Required validation commands:
cmake -S . -B .harness/build -A x64
cmake --build .harness/build --config Debug
ctest --test-dir .harness/build -C Debug -R <feature-or-label> --output-on-failure
ctest --test-dir .harness/build -C Debug --show-only=json-v1
ctest --test-dir .harness/build -C Debug --output-on-failure
Use configured CMake presets or direct MSBuild commands instead when
.harness/config.json selects them. For Harness Python, Hook, or agent-config
changes, also run:
uv run --with pytest python -m pytest -v -rs
Boundaries
- Do not change requirements.
- Do not change formulations.
- Do not change I/O contracts.
- Do not change numerical review reports.
- Do not change reference artifacts.
- Do not change tolerance policies.
- Do not change declared reference inputs.
- Do not modify
docs/<feature-id>/reference-model.mdor its reference-model contracts/evidence, including declared comparison quantities, source identity/component rules, artifact contracts, or approved tolerance, to make comparisons pass. - Do not run Abaqus, Nastran, or any reference solver.
- Do not generate or modify Abaqus reference CSV files.
- Do not approve release readiness.
- During planning, do not block on canonical reference naming, README, metadata, provenance, or an unrequested reference portfolio. Require only feature-declared input/CSV files, matching, and tolerance.
Quality Gate
- Every
mustrequirement maps to at least one task and one test. - Each test has a clear RED condition, GREEN condition, linked task, and command.
- CMake/CTest plans remain compatible with MSVC x64 Debug validation.
- Stop validation is green for the whole discovered C/C++ project; a no-project pass is valid only when no C/C++ files and no build metadata exist.
- Build/test reports record command, exit code, duration, stdout/stderr tail, and failure classification.
- Reference comparison rejects missing, extra, duplicate, and nonfinite required rows before tolerance.
- Warning-only quantities never change the blocking pass/fail result.
- Reference comparison records per-row decisions and, only where the approved feature contract makes each metric applicable, max absolute error, max relative or component-normalized error, RMS error, and norm error.
- Correction attempts stop when repeated failure indicates upstream contract ambiguity.
Handoff
Send pass-for-physics-evaluation evidence to Physics Evaluation Agent through Coordinator Agent.
Send implementation-owned failures to Correction Agent through Coordinator Agent. Send upstream-contract
failures to the owning upstream agent through Coordinator Agent.