rl-env-verifier

Verify RL environment integrations against the adapter contract and emit machine-readable verification reports.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/Lingjie-wang/autoRL --skill rl-env-verifier-lingjie-wang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rl-env-verifier
Source: https://github.com/Lingjie-wang/autoRL/tree/main/skills/rl-env-verifier
Command: npx skills add https://github.com/Lingjie-wang/autoRL --skill rl-env-verifier-lingjie-wang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes references (resource) components.

What problem does it solve? After an RL environment integration is produced, there is no independent proof that the environment actually behaves the way its spec claims. This Skill acts as an acceptance gate: it re-constructs the environment through the adapter under test, checks every claim in env_spec.json against runtime behavior, and emits a verification_report.json with a nonzero exit code on failure so downstream training stages can be gated mechanically. ## Core Features & Use Cases - Tiered verification: Matches checks to the execution boundary — generate_only (deliverables and spec parsing), dry_run (construction, space matching, reset/step contracts, seed determinism), and runtime_allowed (multi-episode NaN/Inf sweeps, reward-bound consistency, construct/close leak cycles). - Three API conventions: Dispatches to dedicated verifier templates for gymnasium single-agent, pettingzoo_parallel multi-agent, and epymarl_multiagentenv (SMAC/SMACv2) integrations, each with convention-specific checks like agent-set monotonic shrink and declared-lossiness honesty. - Verifier self-testing: When the verifier script or check catalog changed, it sabotages one spec field, confirms the corresponding check fails with exit code 1, then regenerates the spec — a verifier that cannot fail is treated as decoration. - Use Case: After rl-env-integrator produces deliverables in runs/<task-id>/artifacts/integration/, run the verifier at the runtime_allowed boundary; on failure, route the failed checks with their smallest_fix entries back to the integrator before any algorithm implementation relies on the environment. ## Quick Start Use the rl-env-verifier skill to verify the integration in runs/<task-id> at the dry_run boundary and write verification_report.json before training relies on the environment.

Frequently Asked Questions about rl-env-verifier

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify an RL environment integration before training?

Run the verifier template matching your spec's api_convention with --run-dir pointing at the run directory and --boundary set to the allowed tier. It re-constructs the environment through adapter.make_env, checks every env_spec.json claim, and writes verification_report.json with exit code 0 on pass.

What is the difference between generate_only, dry_run, and runtime_allowed verification tiers?

generate_only checks that deliverables exist and the spec parses without executing environment code. dry_run adds construction, space matching, reset/step contracts, and seed determinism. runtime_allowed adds multi-episode NaN/Inf sweeps, reward-bound consistency, and 10 construct/close leak cycles.

Which verifier should I use for PettingZoo or SMAC multi-agent environments?

Dispatch on env_spec.json's api_convention field: use verify_parallel_env_template.py for pettingzoo_parallel and verify_epymarl_env_template.py for epymarl_multiagentenv (SMAC, SMACv2, EPyMARL gymma). The gymnasium template only covers single-agent environments.

Why does seed determinism verification fail even though my environment is seeded?

The check requires byte-identical trajectories across two rollouts with identical seeds and identically-seeded action sampling, hashed via canonical_bytes of observations. Unseeded randomness sources anywhere in the stack cause divergence; either thread the seed into all sources or declare deterministic_under_seed=false with a documented reason.

Can the verifier fix a failing environment integration itself?

No. The verifier owns integration verification only and must not patch integration code. On failure it records each failed check with expected, observed, and smallest_fix fields, then hands the report back to rl-env-integrator or a human for the actual fix.

Does a passed verification report mean the environment is trainable?

No. The report carries a standing performance_claims: none field and proves only that the environment behaves as declared in the spec. It makes no claims about trainability, learning performance, or reward quality.