refactor: make coordinator the main workflow agent

This commit is contained in:
KOKO\Mimi
2026-08-15 02:51:36 +09:00
parent aaa3710bf5
commit c020b60f99
19 changed files with 333 additions and 261 deletions
+11 -6
View File
@@ -15,11 +15,16 @@ Read these first:
- `docs/SOLVER_AGENT_DESIGN.md`
- `docs/HARNESS.md`
- `docs/HARNESS_WORKFLOW.md`
- `docs/<feature-id>/requirements.md`
- `docs/<feature-id>/research.md`
- `docs/<feature-id>/formulation.md`
- `docs/<feature-id>/numerical-review.md`
- `docs/<feature-id>/reference-model.md`
- `docs/<feature-id>/io.md`
- `docs/<feature-id>/implementation-plan.md`
- `docs/<feature-id>/implementation-report.md` when present
- `docs/<feature-id>/build-test.md` when present
- `docs/<feature-id>/reference-comparison.md` when present
- Related requirements, formulation, numerical review, I/O definition, and reference model documents
- 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`,
@@ -48,7 +53,7 @@ For Harness implementation, also read `.agents/skills/harness/SKILL.md`,
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 verification in this literal order: `ARTIFACT CHECK -> COMPARE -> CLASSIFY -> REPORT`.
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 `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.
@@ -122,10 +127,10 @@ uv run --with pytest python -m pytest -v -rs
- 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.
- Compile, link, test, and reference-comparison failures return to Implementation Agent first.
- Repeated or unclear implementation failures route to Correction Agent through Coordinator Agent.
- Automatic rework stops when the same normalized failure classification reaches two attempts.
## 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.
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.