Benchmark and mms planner

From NVlabs/Skill2Env · View interactive version

Benchmark and mms planner is an AI agent skill from the GitHub repository NVlabs/Skill2Env. Plan verification and validation campaigns for simulation codes using manufactured solutions, canonical benchmark problems, grid/time refinement, uncertainty propagation, and pass/fail acceptance criteria. Use when an agent needs to prove a solver, model, or result is trustworthy rather than only pl

How to use this skill

Skill file

Benchmark And MMS Planner

Goal

Design a verification and validation plan before trusting simulation results. The skill helps agents choose manufactured solutions, benchmark cases, refinement protocols, uncertainty checks, and pass/fail criteria.

Requirements

Inputs to Gather

| Input | Description | Example |

|-------|-------------|---------|

| PDE or model class | Governing family | diffusion, elasticity, phase-field |

| Quantity of interest | Metric to validate | interface velocity, L2 temperature error |

| Dimension | 1, 2, or 3 | 2 |

| Expected order | Formal discretization order | 2 |

| Reference availability | Analytic, benchmark, or none | analytic |

| Risk level | Cost or consequence of wrong result | high |

Decision Guidance

Script Outputs

scripts/benchmark_mms_planner.py emits inputs and results with:

The accept_observed_order_min is an engineering screening heuristic, not a certified bound: it is the formal expected_order reduced by a fractional tolerance (10% for high risk, 20% otherwise) and floored at first-order convergence (1.0). The relative band keeps strictness consistent across formal orders. See references/vv_patterns.md.

Workflow

  1. Collect the governing model, quantity of interest, and risk level.
  2. Run benchmark_mms_planner.py --json.
  3. Treat warnings as blockers for high-risk claims.
  4. Convert the returned protocol into tests, simulation runs, or review checklist items.
python3 skills/verification-validation/benchmark-and-mms-planner/scripts/benchmark_mms_planner.py \
  --model diffusion \
  --quantity "L2 error in temperature" \
  --dimension 2 \
  --expected-order 2 \
  --reference analytic \
  --risk high \
  --json

Error Handling

Limitations

This skill plans verification work; it does not run the solver or prove that a physical model is appropriate for an experiment.

Verification checklist

Before trusting a result that used this planner, record concrete evidence for each item:

Common pitfalls & rationalizations

| Tempting shortcut | Why it's wrong / what to do |

|-------------------|-----------------------------|

| "The planner ran and printed a plan, so the result is verified." | The script only plans V&V; it never runs the solver. Verification comes from executing the refinement_protocol, MMS, and acceptance_criteria, not from generating the plan. |

| "Two grids converged, so the observed order is fine." | refinement_protocol.levels is 3 (4 for high risk) for a reason: you need >=3 systematically refined grids to estimate observed order and confirm the solution is in the asymptotic range before quoting it. |

| "Observed order beats accept_observed_order_min, so it's certified." | That threshold is an engineering screening heuristic (formal order minus a 10%/20% relative tolerance, floored at 1.0), not a certified bound. For rigorous order verification run a Richardson/GCI study. |

| "Steady-looking model, so I can skip include_time_refinement." | If the planner set include_time_refinement: true (any time-dependent or general fallback family), spatial refinement alone hides temporal error — run the time-step study too. |

| "We matched a benchmark, so the code is validated." | Matching benchmark_cases or converging shows the code approaches some solution; it does not prove the physical model is correct. Validation needs an independent reference plus model-error separation, not convergence alone. |

| "reference none is fine, the runs look physical." | With reference: none the strategy is verification-only; warnings says so. You may report convergence and conservation but must NOT call the result validated. |

| "Unknown model name, so I'll ignore the general fallback." | An unrecognized --model silently resolves to effective_model: general; confirm that fallback is intended, since it changes both benchmark_cases and the time-refinement decision. |

Security

Input Validation

All inputs are command-line arguments parsed by argparse; validation happens in plan_vv (and partly in the parser). Any rejected input causes the script to print the error to stderr and exit with code 2.

File Access

Tool Restrictions

The frontmatter declares allowed-tools: Read, Bash, Write, Grep, Glob.

Safety Measures

References

Version History

refinement_protocol, mms_plan, acceptance_criteria, and warnings) and a

"Common pitfalls & rationalizations" table that pins down domain-specific V&V

shortcuts (plan != verification, >=3 grids for observed order, screening band is not

a certified bound, time refinement, convergence != validation, reference none,

general fallback).

that pin the planner's specific output (resolved verification_strategy, the

relative accept_observed_order_min band, refinement levels,

include_time_refinement, uncertainty_plan flags, model-specific benchmark

cases, and the exact warning strings) for each of the three cases.

time-refinement decision agree (transient unlisted PDEs no longer skip time refinement);

echo the resolved family as effective_model. Replace the fixed absolute observed-order

offset with a relative tolerance floored at first order. Document uncertainty_plan,

effective_model, and the acceptance heuristic. Add 256-character caps on string inputs.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.