fix: preserve implementation step boundaries

This commit is contained in:
KOKO\Mimi
2026-08-15 03:57:29 +09:00
parent 869b6ce241
commit 79a3c1c666
15 changed files with 187 additions and 33 deletions
+13 -7
View File
@@ -25,7 +25,8 @@ Read these first:
- `docs/<feature-id>/implementation-report.md` when present
- `docs/<feature-id>/build-test.md` when present
- `docs/<feature-id>/reference-comparison.md` when present
- Generated FESA `results.h5` and the exact feature-declared reference `.inp` and Abaqus CSV paths
- For the final Implementation-owned verification Step/gate, generated FESA `results.h5` and the
exact feature-declared reference `.inp` and 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
@@ -47,16 +48,21 @@ For Harness implementation, also read `.agents/skills/harness/SKILL.md`,
5. RED: write the planned unit, integration, parser/I/O, or reference-comparison test first.
6. RED: run the targeted test and verify the expected failure before production code.
7. GREEN: implement the minimum C++17/MSVC-compatible code needed for the task.
8. VERIFY: resolve commands from `.harness/config.json` first, then Harness defaults; run the targeted command, then the full MSVC x64 Debug build/test commands in order.
8. VERIFY: resolve commands from `.harness/config.json` first, then Harness defaults; run the
targeted command and any focused/full MSVC x64 Debug build/test commands declared by the current
Step in order.
9. For C++ production changes, require a related C++ test file in the same patch or already present.
10. 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.
11. Let Stop perform the final whole-project MSVC build/test before the Step ends.
12. 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.
13. For failure triage, classify as `configure | compile | link | test | reference-comparison | harness | environment | upstream-contract`.
14. Run reference comparison in this literal order: `ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT`.
15. ARTIFACT CHECK requires exact declared input/CSV paths, generated `results.h5`, the `docs/<feature-id>/io.md` HDF5 projection, source identity/component matching, row uniqueness/finite checks, and approved tolerance.
16. 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.
17. Fix implementation-owned failures only and keep changes traceable to the implementation plan.
14. A non-final Step ends after its declared `RED -> observed failure -> minimal GREEN -> focused/full VERIFY` acceptance commands and owned status/summary update. Do not fail it merely because final solver output, reference artifacts, or `reference-comparison.md` are not yet available.
15. Only when the approved implementation plan places the current Step after all prerequisite
implementation Steps as the final Implementation-owned verification Step/gate, run reference
comparison in this literal order: `ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT`.
16. At that final gate, ARTIFACT CHECK requires exact declared input/CSV paths, generated `results.h5`, the `docs/<feature-id>/io.md` HDF5 projection, source identity/component matching, row uniqueness/finite checks, and approved tolerance.
17. 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.
18. Fix implementation-owned failures only and keep changes traceable to the implementation plan.
## Output Contract
@@ -133,4 +139,4 @@ uv run --with pytest python -m pytest -v -rs
## Handoff
Return the applicable canonical outputs, status, evidence summary, and blockers to Coordinator Agent. Implementation Planning returns `docs/<feature-id>/implementation-plan.md` for one Implementation Agent handoff. Implementation returns `docs/<feature-id>/implementation-report.md`, `docs/<feature-id>/build-test.md`, and `docs/<feature-id>/reference-comparison.md`; send `pass-for-physics-evaluation` to Physics Evaluation Agent through Coordinator Agent. Correction returns `docs/<feature-id>/corrections.md` and a rerun request to Implementation Agent through Coordinator Agent. Return upstream-contract failures to Coordinator Agent for the owning upstream sub-agent.
Return the applicable canonical outputs, status, evidence summary, and blockers to Coordinator Agent. Implementation Planning returns `docs/<feature-id>/implementation-plan.md` for one Implementation Agent handoff. A non-final Implementation Step returns only its owned status/summary and applicable evidence. The final Implementation-owned verification Step/gate returns `docs/<feature-id>/implementation-report.md`, `docs/<feature-id>/build-test.md`, and `docs/<feature-id>/reference-comparison.md`; send `pass-for-physics-evaluation` to Physics Evaluation Agent through Coordinator Agent. Correction returns `docs/<feature-id>/corrections.md` and a rerun request to Implementation Agent through Coordinator Agent. Return upstream-contract failures to Coordinator Agent for the owning upstream sub-agent.