cursorrules

Project rules for a React and Three.js game application with a Cloudflare backend. They define a strict boundary: the game engine handles 3D code, while React handles the interface and communicates through a specified bridge.

In plain words
What is it for?
Use them when changing the engine, React components, Cloudflare Worker services, the admin dashboard, or the bridge that sends game state to the interface.
Why use it?
They prevent incompatible imports and architectural coupling, such as putting React code in the engine or Three.js code in interface components. This keeps rendering and interface state connected through the intended channel.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/anashel-rpg/ev2090/cursorrules
Clone the repo
git clone --depth 1 https://github.com/Anashel-RPG/ev2090

Made for: Cursor.

Per session 1,052 This file is loaded in full into every session.
When invoked 1,052 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01052 $0.01052
Opus 5 $0.00526 $0.00526
Sonnet 5 $0.00210 $0.00210
Haiku 4.5 $0.00105 $0.00105

Measured 2d ago against content hash 95f0f10bc062, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursorrules · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

EV · 2090 — Cursor Rules

https://ev2090.com | React 19 + Three.js + Cloudflare Workers

The One Rule (Architecture Boundary)

NEVER import React in any file under engine/. NEVER import Three.js in any file under components/. The engine is pure Three.js. React and the engine communicate only through GameCanvasHandle (imperative ref in GameCanvas.tsx). The engine pushes GameState to React at ~20fps via a subscribe callback. When a component needs 3D rendering, create a standalone class in engine/ and instantiate it from the component via useEffect — see ShipPreview.ts and ShipDetailRenderer.ts for the pattern.

Tech Stack

  • React 19 + Three.js 0.172 + TypeScript 5.7 + Vite 6 (frontend)
  • Cloudflare Workers + Durable Objects + R2 + Queues (backend, worker/)
  • MCP server with 37 tools and OAuth 2.0 (worker-mcp/)
  • Admin dashboard (admin/) — local dev only, never deploy
  • Path alias: @/frontend/src/

Key Files

  • frontend/src/engine/Engine.ts — core game loop, scene, all subsystem orchestration
  • frontend/src/components/GameCanvas.tsx — React-to-Engine bridge (forwardRef + useImperativeHandle)
  • frontend/src/components/Game.tsx — top-level React orchestrator
  • frontend/src/types/game.ts — shared types: GameState, ShipState, RadarContact
  • frontend/src/engine/ShipCatalog.ts — ship definitions (11 built-in + community)
  • worker/src/index.ts — HTTP router + queue consumer
  • worker/src/economy-region.ts — NPC economy engine (SQLite, 60s tick alarm)
  • worker-mcp/src/index.ts — MCP server entry point

Patterns to Follow

Engine systems (engine/systems/)

Always: constructor(scene, ...) + update(dt) + dispose() Wire into Engine.ts: instantiate in constructor, call update(dt) in loop, call dispose() in Engine.dispose().

Engine entities (engine/entities/)

Always: constructor(config) + update(dt) + dispose() Entity owns a THREE.Group as root mesh. scene.add(entity.mesh) in Engine, entity.dispose() on teardown. All Three.js objects (geometry, materials, textures) MUST be disposed to prevent GPU memory leaks.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 71 lines · 1,052 tokens per session scan A 95f0f10bc062

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Anashel-RPG/ev2090 (10 stars, last pushed 5mo ago), licensed MIT. It adds 1,052 tokens to every session, about $0.0053 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.