# Read the repo before you plan

**Type:** rule

Ground every plan in the actual file tree, scripts, constraints, and current behavior.

## Copy text

Before proposing changes, inspect the repository structure, project instructions, package scripts, relevant source files, tests, and current runtime behavior. Separate what you confirmed from what you inferred.

[Source](https://developers.openai.com/codex/guides/agents-md)

---

# Keep build proof and runtime proof separate

**Type:** rule

A green build is useful evidence, but it is not evidence that the visible experience works.

## Copy text

Report build, automated test, and runtime validation as separate results. For user-facing changes, verify the real surface at representative viewport sizes and exercise the main interaction path.

[Source](https://playwright.dev/docs/test-assertions)

---

# Dispose Three.js GPU resources explicitly

**Type:** rule

Remove stale geometries, materials, textures, and render targets when scenes change.

## Copy text

When a Three.js object leaves the application for good, dispose its geometry, materials, textures, and render targets. Removing an object from the scene does not release the GPU resources it allocated.

[Source](https://threejs.org/manual/#en/cleanup)

---

# Bound animation delta after a pause

**Type:** rule

Prevent a hidden tab or debugger pause from turning one frame into a physics explosion.

## Copy text

Clamp frame delta before feeding it into animation or simulation code. For deterministic physics, accumulate bounded time and advance fixed substeps with a maximum step count.

[Source](https://gafferongames.com/post/fix_your_timestep/)

---

# Keep per-frame values out of React state

**Type:** rule

Use refs and the render loop for values that change every frame.

## Copy text

In React Three Fiber, do not call React state setters for per-frame transforms or other rapidly changing values. Mutate object refs inside useFrame and reserve React state for application state that should cause a render.

[Source](https://r3f.docs.pmnd.rs/advanced/pitfalls)

---

# Run web physics on a fixed timestep

**Type:** rule

Keep simulation results stable across fast displays, slow frames, and recording tools.

## Copy text

Advance the physics world with a fixed timestep, accumulate elapsed render time, and cap the number of catch-up steps. Interpolate visual transforms when the renderer needs smoother motion.

[Source](https://rapier.rs/docs/user_guides/javascript/integration_parameters)

---

# Enable the Rapier events you intend to read

**Type:** rule

Collision and contact callbacks need active events on the relevant collider.

## Copy text

When collision callbacks appear silent in Rapier, confirm that active collision events are enabled on the collider and that the event queue is drained after each physics step.

[Source](https://rapier.rs/docs/user_guides/javascript/advanced_collision_detection_js)

---

# Give Box2D sensible world units

**Type:** rule

Model ordinary objects in meter-like units instead of sending pixel coordinates directly into physics.

## Copy text

Choose a stable pixels-to-world scale and keep typical moving objects near ordinary meter-like sizes. Convert only at the render boundary instead of mixing pixels and world units throughout the simulation.

[Source](https://box2d.org/documentation/)

---

# Keep generated Unreal files out of reviews

**Type:** rule

Focus reviews on project source and authored content by excluding generated outputs.

## Copy text

Before asking an agent to review or change an Unreal project, identify generated folders and build outputs that should not be edited. Keep the review focused on Source, Config, Plugins, and the specific authored content in scope.

[Source](https://github.com/github/gitignore/blob/main/UnrealEngine.gitignore)

---

# State your Unity play mode assumptions

**Type:** rule

Domain reload settings can change whether static state resets between runs.

## Copy text

When debugging Unity behavior that changes between editor runs, record the Enter Play Mode settings and whether domain and scene reload are enabled. Do not assume static fields reset in every project.

[Source](https://docs.unity3d.com/Manual/configurable-enter-play-mode.html)

---

# Debug a blank Three.js canvas

**Type:** prompt

A focused diagnostic prompt for the classic scene that renders nothing.

## Copy text

Diagnose why this Three.js scene renders a blank canvas. Inspect the camera position and clipping planes, renderer size and pixel ratio, scene lighting and material requirements, object transforms, asset loading failures, canvas CSS size, the animation loop, and console errors. Report confirmed evidence first. Then make the smallest fix and verify it in the browser.

[Source](https://threejs.org/manual/#en/debugging-javascript)

---

# Profile a slow WebGL frame

**Type:** prompt

Separate CPU, GPU, asset, shader, and layout costs before optimizing.

## Copy text

Profile this slow WebGL experience without redesigning it. Capture a representative frame and separate main-thread script, layout, draw-call count, shader compilation, texture upload, GPU time, physics steps, and garbage collection. Rank the three largest measured costs, propose one reversible experiment for each, and retest after every change.

[Source](https://developer.chrome.com/docs/devtools/performance)

---

# Review game physics feel

**Type:** prompt

Connect input, camera, simulation, and presentation before suggesting tuning changes.

## Copy text

Review the feel of this physics-driven game. Trace input sampling, force or impulse application, fixed-step timing, collision material settings, camera follow, animation smoothing, and audio feedback. Describe the current behavior in plain language, identify the earliest point where the feel diverges, and make one direct tuning change at a time. Preserve the existing architecture unless evidence requires a larger change.


---

# Write a useful AGENTS.md

**Type:** prompt

Turn repeated project knowledge into scoped, testable agent instructions.

## Copy text

Draft an AGENTS.md for this repository. Inspect the project first. Include only durable facts: repository purpose, where source and tests live, required commands, validation expectations, formatting conventions, generated or forbidden paths, deployment boundaries, and any nested scope rules. Keep instructions short, specific, and possible to verify. Do not restate generic coding advice.

[Source](https://developers.openai.com/codex/guides/agents-md)

---

# Review a Cloudflare Worker for production

**Type:** prompt

A copy-ready review that checks bindings, streaming, promises, security, and observability.

## Copy text

Review this Cloudflare Worker against current official documentation. Check binding types, compatibility date and flags, streaming of large bodies, floating promises, request-scoped global state, secret handling, structured errors, observability, and direct use of platform bindings. Cite the exact source line for each finding and separate correctness issues from optional improvements.

[Source](https://developers.cloudflare.com/workers/best-practices/workers-best-practices/)

---

# Three.js Manual

**Type:** resource

Practical guides for scenes, cameras, responsive rendering, cleanup, post-processing, and debugging.

## Copy text

https://threejs.org/manual/

[Source](https://threejs.org/manual/)

---

# Rapier JavaScript guide

**Type:** resource

Official setup and concept guides for the Rapier physics engine in browser projects.

## Copy text

https://rapier.rs/docs/user_guides/javascript/getting_started_js

[Source](https://rapier.rs/docs/user_guides/javascript/getting_started_js)

---

# Babylon.js Documentation

**Type:** resource

A broad guide to Babylon.js rendering, materials, input, physics, and deployment.

## Copy text

https://doc.babylonjs.com/

[Source](https://doc.babylonjs.com/)

---

# PlayCanvas Developer Site

**Type:** resource

Engine guides, API references, tutorials, and editor documentation for web 3D.

## Copy text

https://developer.playcanvas.com/

[Source](https://developer.playcanvas.com/)

---

# Unity Manual

**Type:** resource

The primary reference for editor workflows, platform builds, physics, rendering, and profiling.

## Copy text

https://docs.unity3d.com/Manual/index.html

[Source](https://docs.unity3d.com/Manual/index.html)

---

# Unreal Engine Documentation

**Type:** resource

Official engine documentation for C++, Blueprints, rendering, Chaos, and platform delivery.

## Copy text

https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-6-documentation

[Source](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-6-documentation)

---

# Godot Engine documentation

**Type:** resource

Open source guides for 2D, 3D, physics, scripting, shaders, and exporting games.

## Copy text

https://docs.godotengine.org/en/stable/

[Source](https://docs.godotengine.org/en/stable/)

---

# Model Context Protocol specification

**Type:** resource

The protocol and SDK reference behind MCP servers, tools, resources, and prompts.

## Copy text

https://modelcontextprotocol.io/specification/

[Source](https://modelcontextprotocol.io/specification/)

---

# OpenAI Codex CLI

**Type:** tool

A local coding agent that can read, change, and run code in a terminal workflow.

## Copy text

https://github.com/openai/codex

[Source](https://github.com/openai/codex)

---

# Playwright MCP server

**Type:** tool

Browser automation for agents through structured accessibility snapshots and interactions.

## Copy text

https://github.com/microsoft/playwright-mcp

[Source](https://github.com/microsoft/playwright-mcp)

---

# Cloudflare documentation MCP server

**Type:** tool

An official MCP server for retrieving current Cloudflare developer documentation.

## Copy text

https://github.com/cloudflare/mcp-server-cloudflare

[Source](https://github.com/cloudflare/mcp-server-cloudflare)

---

# Blender MCP

**Type:** tool

A community bridge for controlling Blender and inspecting scenes through MCP.

## Copy text

https://github.com/ahujasid/blender-mcp

[Source](https://github.com/ahujasid/blender-mcp)

---

# Three.js Editor

**Type:** tool

The official browser editor for composing and exporting Three.js scenes.

## Copy text

https://threejs.org/editor/

[Source](https://threejs.org/editor/)

---

# Drei

**Type:** tool

A large helper library for common React Three Fiber scene patterns.

## Copy text

https://github.com/pmndrs/drei

[Source](https://github.com/pmndrs/drei)

---

# react-three-rapier

**Type:** repository

React components and hooks for using Rapier in React Three Fiber scenes.

## Copy text

https://github.com/pmndrs/react-three-rapier

[Source](https://github.com/pmndrs/react-three-rapier)

---

# Ecctrl character controller

**Type:** repository

A floating rigid-body character controller for React Three Fiber and Rapier.

## Copy text

https://github.com/pmndrs/ecctrl

[Source](https://github.com/pmndrs/ecctrl)

---

# Babylon.js

**Type:** repository

The open source web rendering engine and its full monorepo of packages, tools, and viewers.

## Copy text

https://github.com/BabylonJS/Babylon.js

[Source](https://github.com/BabylonJS/Babylon.js)

---

# Jolt Physics

**Type:** repository

A multi-core rigid body physics and collision detection library used in games and engines.

## Copy text

https://github.com/jrouwe/JoltPhysics

[Source](https://github.com/jrouwe/JoltPhysics)

---

# Box2D

**Type:** repository

The source for the widely used 2D rigid body engine and its current samples.

## Copy text

https://github.com/erincatto/box2d

[Source](https://github.com/erincatto/box2d)

---

# PlayCanvas Engine

**Type:** repository

A JavaScript game engine with WebGL, WebGPU, glTF, animation, audio, and physics support.

## Copy text

https://github.com/playcanvas/engine

[Source](https://github.com/playcanvas/engine)
