diff --git a/.claude/skills/run-analysis/SKILL.md b/.claude/skills/run-analysis/SKILL.md index a6b2bab..42fb62d 100644 --- a/.claude/skills/run-analysis/SKILL.md +++ b/.claude/skills/run-analysis/SKILL.md @@ -87,8 +87,9 @@ of every segment (Read the PNGs — never ship an unviewed render). data in `src/data.json` regenerated from `leaderboard.json`). Assets must live under `public/` (staticFile) — junctions break the bundler. - Timelapse source: `ffmpeg -i master.mkv -vf "setpts=PTS/60,fps=24,crop=trunc(iw/2)*2:trunc(ih/2)*2" -an`. -- **Dashboard clip rig** (source: `scripts/record_dashboard.mjs`) — headless Playwright - recording, never screen capture. Four processes, in order: +- **Dashboard clip rig** (source: `D:\RLE_media\capture\record_dashboard.mjs` — the + rle-media repo, which is the set-up scratch dir with playwright already installed) — + headless Playwright recording, never screen capture. Four processes, in order: 1. RimWorld + RIMAPI up (the dashboard's connect gate probes :8765; CORS is fine, but the URL field starts EMPTY — the script fills it and clicks Connect). 2. `./.venv/Scripts/python scripts/serve_dashboard.py results/replay` (CORS server :9000). @@ -96,11 +97,12 @@ of every segment (Read the PNGs — never ship an unviewed render). (Remotion's render server squats on 3000; craco exits "already running" instead of failing loud). 4. `python scripts/replay_ticks.py --model --interval 2 --loop` (feeds results/replay/latest_tick.json from the run's tick_snapshots). - Then record: set up a scratch dir once (`bun add playwright && bunx playwright install - chromium`), copy record_dashboard.mjs next to it, and run with **node** — Playwright's - chromium launch hangs 180s under bun on Windows. The script seeds the 5 RLE widgets via - a localStorage `dashboard_presets` preset (fresh browser contexts have no layout, and the - RLE widgets aren't in the default). Record 1920x1080 and 1080x1920 passes; trim the + Then record from `D:\RLE_media\capture\` (playwright already installed there; if starting + fresh elsewhere, `bun add playwright && bunx playwright install chromium` first) and run + with **node** — Playwright's chromium launch hangs 180s under bun on Windows. The script + seeds the 5 RLE widgets via a localStorage `dashboard_presets` preset (the dashboard now + also ships built-in `RLE Capture`/`RLE Vertical` presets selectable via `?preset=`, and + `?api=` skips the connect gate — either path works). Record 1920x1080 and 1080x1920 passes; trim the connect/load preamble (~8s) when converting webm → mp4 (`ffmpeg -ss 8 -i in.webm -c:v libx264 -crf 19 -pix_fmt yuv420p -r 30 out.mp4`). - Verify every render before calling it done: extract stills of each segment with ffmpeg diff --git a/CLAUDE.md b/CLAUDE.md index 790fe69..b1006b8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# RLE — RimWorld Learning Environment +# RLE — RimWorld Learning Environment Multi-agent benchmark where 7 Felix Agent SDK role-specialized LLM agents manage a RimWorld colony. Think FLE (Factorio Learning Environment) but for multi-agent coordination under uncertainty. @@ -382,9 +382,11 @@ scripts/ ├── analyze_spread.py # Cross-model leaderboard vs baseline + failure taxonomy ├── visualize_results.py # Matplotlib CSV plotter ├── serve_dashboard.py # CORS-enabled file server for dashboard +├── obs_record.py # OBS recording start/stop/status via obs-websocket (per-model files) +├── obs_studio.py # OBS scene setup (Game/Dashboard/PiP/Vertical) + live score ticker ├── replay_ticks.py # Replay a run's tick snapshots into the dashboard (for capture) -├── record_dashboard.mjs # Headless Playwright dashboard recording (run with node) └── capture_run_media.sh # During-run game-window stills + tick snapshots +# (post-run Playwright dashboard recording lives in the rle-media repo: capture/record_dashboard.mjs) docker/ ├── Dockerfile # HeadlessRim + Xvfb (debian:bookworm-slim) ├── docker-compose.yml # Volume mounts for game files, mods, saves diff --git a/scripts/obs_record.py b/scripts/obs_record.py new file mode 100644 index 0000000..32c9001 --- /dev/null +++ b/scripts/obs_record.py @@ -0,0 +1,86 @@ +# /// script +# dependencies = ["obsws-python>=1.7"] +# /// +"""Control OBS recording via obs-websocket (v5) for benchmark run capture. + +Usage (run via uv so the dependency resolves without polluting the venv): + uv run scripts/obs_record.py status + uv run scripts/obs_record.py start --label fable5 + uv run scripts/obs_record.py stop + +The WebSocket password is read from the OBS_WS_PASSWORD env var, falling back +to OBS's own plugin config file. `start --label X` sets the recording filename +to ``rle_