oracle-playtest-gate
# Oracle Playtest Gate (`oracle-playtest-gate`)
> **Zero-Dependency Stateful Fresh-Eyes UX QA, 710k-nodes/sec BFS/A* State-Space Trap Explorer, Brier-Calibrated Sovereign Triad CI Gate, SEP-1865 MCP App & Dual-Rail `x402`/Stripe Cloudflare Edge Worker.**
[](https://nodejs.org)
[](#architecture)
[](#mcp-server--interactive-mcp-app)
[](./LICENSE)
Standard DOM linters and single-agent self-reviews miss **stateful UX traps** (dead-end sub-modes, QWERTZ dead-key shortcuts, terminal focus loss, unvalidated form sentinels) and collapse under autonomous iteration via **echo-chamber collusion** and **Goodhart drift**.
`oracle-playtest-gate` ships **7 production-tested Agent Skills**, a unified zero-dependency CLI (`opg`), an interactive **MCP App State-Graph & Playtest Inspector**, and a **Cloudflare Edge Worker** with dual-rail Stripe (€19/mo) + `x402`/Stripe MPP ($0.02/audit) billing.
---
## 1-Line Install (`skills.sh` / Agent Skills)
Install all 7 skills directly into Claude Code, Antigravity, Cursor, Codex, or Windsurf:
```bash
npx skills add paul1064/oracle-playtest-gate
```
Or run the CLI / MCP server directly with Node.js >= 20 (zero external `npm` packages required):
```bash
git clone https://github.com/paul1064/oracle-playtest-gate.git
cd oracle-playtest-gate
node bin/oracle-playtest-gate.mjs --help
npm test
```
---
## Included Skills & Zero-Dependency Engines
| Skill (`skills/*`) | CLI Subcommand | What It Verifies |
| :--- | :--- | :--- |
| **`blind-playtest-audit`** | `opg playtest <html\|dir> [--json]` | Fresh-Eyes UX & anti-slop HTML/JS linter: dead links (`href="#"`), unvalidated `BITTE-WÄHLEN`/`SELECT-OPTION` sentinels, QWERTZ `` ` `` traps, `dblclick` selection leaks, terminal focus loss, unlabeled icon buttons, and unbalanced orphan grids. Pairs cleanly with `microsoft/playwright-mcp` & `Nutlope/hallmark`. |
| **`oracle-first-exploration`** | `opg explore <adapter.mjs> [--mode bfs\|astar]` | Parallel BFS & A* headless state-space explorer (~710k nodes/sec, >16.7M sharded states, SHA-256 crash-safe `.ck`/`.bak` checkpoints) + `@oracle/core` `exploreOracle` trap/decoy/dead-action graph engine & `SelfImproveVault` SHA-256 invariant guard. |
| **`variant-arena`** | `opg arena --candidate a="..." --candidate b="..."` | Interleaved warmup + multi-round median-latency benchmark gated on hard exit-code + `--stdout` regex signals. |
| **`brier-calibration-loop`** | `opg calibrate <predictions.jsonl>` | Paper-before-Real gate computing Brier score & `brier_delta` vs. reference baselines; quarantines coin-flip/unbounded-loss categories. |
| **`si-algo`** | `opg si-algo evaluate <session.json>` | Sovereign Integral Gate: Proposal x Syzygos Critique x Independent Verifier triad with lexical/zero-critique collusion detection & Goodhart drift veto. |
| **`magic-patch-packager`** | `opg pack-magic --repo . --out ./deliveries ...` | Packages verified `MagicNNN/` delivery bundles (`REPORT.md`, `changes.patch`, `files/`, `ledger.md`) using isolated `GIT_INDEX_FILE` + `git apply --check` and secret-free diff scanning. |
| **`repo-xray`** | `opg xray . [--json] [--svg map.svg]` | Sub-second read-only repository hotspot, CI, skill SHA-256 invariant, and redacted secret scanner with POSIX `/` paths and Archify/Graphify-style SVG diagram export. |
---
## MCP Server & Interactive MCP App
Add `oracle-playtest-gate` to your `mcp_config.json` (Antigravity, Claude Desktop, VS Code Copilot, Goose):
```json
{
"mcpServers": {
"oracle-playtest-gate": {
"command": "node",
"args": ["/path/to/oracle-playtest-gate/src/mcp-server.mjs"]
}
}
}
```
### Deterministically Sorted Tools (Prompt-Cache Safe)
- `brier_calibrate` — Evaluate settled JSONL predictions (`REAL_ELIGIBLE` / `PAPER_ONLY` / `REVERT_OR_DROP`).
- `open_playtest_inspector` — Launch the interactive **SEP-1865 MCP App** (`ui://oracle-playtest-gate/inspector.html`, MIME `text/html;profile=mcp-app`) in inline or side-pane mode.
- `oracle_explore_state` — Explore declarative finite-state machines and render interactive Start / Explore / Goal / Trap / Decoy graphs.
- `playtest_audit_html` — Run Fresh-Eyes UX & anti-slop audits on HTML/JS markup and inspect findings visually.
- `repo_xray_map` — Generate repository hotspot & hygiene maps + deterministic SVG architecture cards.
- `si_triad_gate` — Score adversarial Proposal x Syzygos x Verifier sessions with Brier/Goodhart drift protection.
---
## Cloudflare Edge Gate (`worker/` — Dual-Rail Stripe + `x402` / MPP)
Deploy zero-LLM-token playtest, triad, and calibration gates to Cloudflare Workers (`>95%` margin):
1. Copy `worker/.dev.vars.example` to `worker/.dev.vars` and set your secrets.
2. Deploy with Wrangler:
```bash
npx wrangler deploy --config worker/wrangler.jsonc
```
3. **Dual-Rail Access**:
- **Human Teams (€19/mo):** Subscribe via `POST /api/billing/checkout` (Stripe Checkout) and authenticate with `Authorization: Bearer <license_token>`.
- **Autonomous Agents ($0.02/audit):** Unauthenticated calls to `POST /api/v1/audit/{playtest,triad,calibrate}` receive a standard `HTTP 402 Payment Required` challenge supporting **`x402` USDC** (`X-Payment`) and **Stripe Machine Payments Protocol** (`X-Stripe-MPP-Receipt`).
---
## Pro Packs, Playbooks & Upgrades
Support open-core development and unlock ready-to-run team templates, multi-agent playbooks, and production bundles on **[nobis23.gumroad.com](https://nobis23.gumroad.com)**:
- **Oracle Playtest & Sovereign CI Pro Pack (€39)** — Turnkey GitHub Action PR blocking templates, multi-repo `si-algo` governance presets, Playwright + Hallmark visual playtest harnesses, and production Cloudflare `x402`/MPP deployment recipes: **[Get Pro Pack on Gumroad ->](https://nobis23.gumroad.com)**
- **Das Antigravity Duo — Einsteiger + Yodas Bundle (€24)** — Complete 2-book engineering guide covering clean Antigravity workspaces, custom MCP servers, strict prompt-cache hygiene, parallel subagent isolation, and Syzygos verification gates: **[Get Antigravity Duo (€24) on Gumroad ->](https://nobis23.gumroad.com)**
- **Full Studio, Engineering & AI Catalog** — Browse all one-page-per-recipe Kitchen handbooks, VST3 plugins, and live tools at **[https://nobis23-werkstatt.netlify.app/](https://nobis23-werkstatt.netlify.app/)** ([`#buecher`](https://nobis23-werkstatt.netlify.app/#buecher) · [`#forge`](https://nobis23-werkstatt.netlify.app/#forge)), **[THE WONDER ENGINE](https://wonder-engine.paul-live.workers.dev/)**, and **[https://nobis23.gumroad.com](https://nobis23.gumroad.com)**.
---
## License
[MIT](./LICENSE) © 2026 `paul1064`
TDQS
Scored across 6 tools
Most tools have clearly distinct inputs and outputs: calibration on prediction records, triad gating on session artifacts, HTML auditing, repo mapping, and state exploration. brier_calibrate and si_triad_gate both perform evaluation/gating, and playtest_audit_html and repo_xray_map both audit artifacts, but their scopes are sufficiently differentiated.
All names use snake_case and are readable, but structural patterns vary: verb-first (open_playtest_inspector), noun-verb (brier_calibrate, oracle_explore_state, playtest_audit_html), and noun-compound (repo_xray_map, si_triad_gate). There is no consistent verb_noun convention across the set.
Six tools is a well-scoped size for a specialized playtest/gating suite, with each tool representing a distinct capability. The set avoids both redundancy and extreme thinness.
The surface covers interactive exploration, headless state analysis, HTML UX auditing, repository mapping, Brier calibration, and triad gating, which spans the apparent evaluation lifecycle. Minor possible gaps include consolidated reporting or preset/config management, but core workflows are represented.