Skip to content

GenieGuard

GenieGuard is a “World-Sim CI” pipeline that automatically audits and self-repairs physics in AI-generated games/simulators.

Core trick

Gemini returns a config-only JSON patch checked against a key whitelist and value ranges, then the simulation re-runs its invariant checks.

Tags

Description

GenieGuard is a “World-Sim CI” pipeline that automatically audits and self-repairs physics in AI-generated games/simulators. It injects physics bugs into a Matter.js world, collects telemetry + screenshots, and diagnoses issues with Gemini 3.1 Pro Preview using a multi-agent VLM workflow: a Vision Analyst (screenshots) and a Physics Analyst (telemetry/config) run in parallel, then a Repair Synthesizer cross-validates findings to output a safe JSON patch (config diffs only, no code generation). Patches are gated by a sandbox (whitelist + value-range validation), applied to config.js, the sim auto-reloads, and the system re-verifies all invariants. If verification fails, GenieGuard runs a self-reflection loop to re-diagnose and retry. Result: a closed-loop CI step that turns “physics hallucinations” into a deterministic, repeatable QA + repair workflow for game developers.
maruyamakoju/genieguard★ 00 forksHTMLCreated Feb 21, 2026 · last push Feb 22, 2026

README excerpt

# GenieGuard: QA for the Vibe-Coding Era

> **AI writes the game. AI also QA's the game.**

In the age of vibe coding — where Cursor, Claude, and Copilot generate entire games in minutes — **nobody writes tests for the output**. Physics parameters are wrong, collisions don't work, gravity is inverted... and there's no QA engineer in the loop.

**GenieGuard** is a closed-loop CI agent that **automatically detects, diagnoses, and self-repairs** broken physics in AI-generated games. It watches the running simulation, spots what's wrong, and fixes it — without human intervention.

---

## Why This Matters

Traditional game dev has unit tests, QA teams, and physics engine expertise. Vibe coding has none of that:

| Traditional Dev | Vibe Coding |
|---|---|
| Physics engineer tunes parameters | AI generates config, nobody checks |
| QA team plays and reports bugs | Ship it and hope for the best |
| Unit tests catch regressions | No tests written at all |
| Bugs found in days/weeks | Bugs shipped instantly to users |

GenieGuard fills this gap: **the AI that QA's what AI built.**

---

## How It Works

### 2-Tier Architecture

**Tier 1 — Known Bug Patterns (Catalog Repair)**
Invariant checks detect common physics bugs (gravity inversion, collision disabled, etc.) and apply pre-defined patches instantly. Fast and deterministic.

**Tier 2 — Unknown Bugs (Multi-Agent VLM Reasoning)**
For bugs GenieGuard has never seen before, three AI agents work together:

```
┌───────────────────────

Team