beyond-fable: Instructions file for Codex

AGENTS.md

beyond-fable AGENTS.md is an instructions file for Codex, OpenCode from xikhar/beyond-fable. It costs 6,521 tokens per session, scanned A, original, MIT.

A set of instructions for Beyond Fable, a browser-based first-person wilderness explorer built with TypeScript, Vite, and Three.js. The game creates its terrain, scenery, weather, and other world elements in the browser.

In plain words
What is it for?
It helps developers run, type-check, build, and preview the game while working with procedural 3D worlds, streamed terrain chunks, generated assets, and browser performance features.
Why use it?
It gives coding agents the project's structure, technology choices, commands, and performance expectations before they make changes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is xikhar/beyond-fable's own configuration. It tells Codex and OpenCode how to work on beyond-fable itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything beyond-fable configures →

Reuse

Borrowing it

Nothing to install: this file belongs to xikhar/beyond-fable. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/xikhar/beyond-fable/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/xikhar/beyond-fable

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for beyond-fable AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xikhar/beyond-fable/agents-md/github.svg)](https://agentmods.dev/instructions/xikhar/beyond-fable/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/xikhar/beyond-fable/agents-md"><img src="https://agentmods.dev/badge/instructions/xikhar/beyond-fable/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for beyond-fable AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xikhar/beyond-fable/agents-md"><img src="https://agentmods.dev/badge/instructions/xikhar/beyond-fable/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,521 This file is loaded in full into every session.
When invoked 6,521 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.06521 $0.06521
Opus 5.5 $0.02608 $0.02608
Sonnet 5.5 $0.01304 $0.01304
Haiku 4.5 $0.00652 $0.00652

Measured 2mo ago against content hash cf73caf226e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

beyond-fable AGENTS.md 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 2mo 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.

AGENTS.md · 535 lines

How it starts

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

AGENTS.md — Beyond Fable

Guide for AI agents and developers working on this codebase.

Project summary

Beyond Fable is a browser-based, first-person procedural wilderness explorer built with TypeScript, Vite, and Three.js. Every page load generates a new seeded open world: terrain, forests, grass, rocks, water, sky, day/night, weather, and interactables. There is no backend, no downloaded asset packs, and no external game engine.

Design goals: Skyrim/Elden Ring-inspired scale and atmosphere, fully procedural geometry/textures/shaders, chunked streaming, and laptop-friendly performance via instancing, LOD, and fog.


Commands

npm install          # install deps
npm run dev          # dev server (default http://localhost:5173)
npm run build        # tsc + production bundle → dist/
npm run preview      # serve production build
npm run typecheck    # TypeScript only

Always run npm run typecheck (or npm run build) after substantive edits.


Tech stack

Layer Choice
Language TypeScript (strict)
Bundler Vite 5
3D Three.js 0.165 (WebGL2)
Assets 100% procedural (canvas textures, shaders, generated geometry)
Physics Custom: analytic terrain height + cylinder push-out (no physics engine)

Directory layout

beyond-fable/
├── index.html              # HUD DOM + canvas mount (#app)
├── src/
│   ├── main.ts             # Entry: seed from URL, start Game
│   ├── config.ts           # Typed exports backed by settings/global-defaults.json
│   ├── settings/
│   │   └── global-defaults.json # ★ Editable global world/gameplay/render defaults
│   ├── styles.css          # HUD / overlay styles
│   │
│   ├── core/               # Application shell
│   │   ├── Game.ts         # Main loop, quality fallback, wires all systems
│   │   ├── Renderer.ts     # WebGLRenderer + EffectComposer post chain
│   │   ├── CameraController.ts  # FPS walk + fly mode, terrain collision
│   │   └── Hud.ts          # FPS, seed, time/weather, interact UI, hack menu
│   │
│   ├── render/
│   │   └── AerialFogPass.ts # Scene render + depth-based distance-fog composite
│   │
│   ├── world/              # Scene content & simulation
│   │   ├── World.ts        # ★ Top-level world composition root
│   │   ├── Terrain.ts      # Analytic height field + chunk mesh builder
│   │   ├── Biomes.ts       # Moisture, forest mask, ground color, placement rules
│   │   ├── ChunkManager.ts # ★ Chunk streaming, LOD, build/grass/tree-batch queues
│   │   ├── FarTerrain.ts   # Distant ~11 km horizon mesh (1 draw call)
│   │   ├── Environment.ts  # ★ Day/night, weather, wind, lights, rain, torch
│   │   ├── Sky.ts          # Sky dome mesh + shader uniforms
│   │   ├── Water.ts        # Water chunk meshes + player ripple state
│   │   ├── Vegetation.ts   # Chunk-streaming facade over the vegetation/ grammar
│   │   ├── GrassSettings.ts # Runtime-tunable grass params (hack menu)
│   │   ├── Rocks.ts        # Props class: boulders, stones, logs, shrubs, flowers
│   │   ├── Structures.ts   # Fantasy landmarks (spires, floating islands, fossils…)
│   │   ├── Glow.ts         # Bioluminescent plants + fireflies (night)
│   │   ├── SnowTrail.ts    # Temporary footstep depressions in snow
│   │   ├── Clearings.ts    # Deterministic campfire-clearing test (shared by veg + POIs)
│   │   ├── Fire.ts         # Lightable campfire: procedural flame/ember shaders
│   │   └── Interactables.ts # POIs + InteractionSystem (E key)
│   │
│   ├── vegetation/         # ★ Procedural flora kit (no external assets)
│   │   ├── Botany.ts       # Profile/tier/canopy/skeleton type definitions
│   │   ├── TreeCatalog.ts  # TREE_CATALOG presets (spruce, pine, beech, birch, karst, snag, oak, cherry)
│   │   ├── Branching.ts    # Recursive branch growth (tropisms, phyllotaxis, crown envelope)
│   │   ├── MeshForge.ts    # Append-only geometry accumulator (shared by all builders)
│   │   ├── Limbs.ts        # Tube hierarchy meshing for bark
│   │   ├── Foliage.ts      # Real leaf / needle-fan geometry builders
│   │   ├── CardAtlas.ts    # Bakes leafy twigs to a per-species atlas; scatters cluster cards
│   │   ├── Assemble.ts     # Profile + SeedStream → bark + foliage geometry (LOD-aware)
│   │   ├── Undergrowth.ts  # Shrubs, ferns, flowers (same grammar, bush-tuned)
│   │   ├── Sward.ts        # Grass blade-tuft geometry
│   │   └── SeedStream.ts   # Label-forkable seeded RNG for the flora kit
│   │
│   ├── procedural/
│   │   ├── Noise.ts        # Seeded 2D simplex + fBm + ridged
│   │   ├── Textures.ts     # CanvasTexture generators (bark, rock, ground)
│   │   └── Materials.ts    # MaterialLibrary (shared PBR materials per world)
│   │
│   ├── shaders/            # GLSL source strings (imported as TS modules)
│   │   ├── noiseGLSL.ts    # Shared hash/fBm for sky & water
│   │   ├── sky.ts
│   │   ├── grass.ts
│   │   ├── treeWind.ts     # Shared trunk-bend wind material wrapper
│   │   └── water.ts
│   │
│   └── utils/
│       ├── Random.ts       # SeededRandom, combineSeed, URL seed parsing
│       ├── GpuInfo.ts      # WebGL adapter vendor/renderer detection
│       └── MathUtils.ts    # clamp, lerp, smoothstep, damp
│
└── README.md               # User-facing docs

Read the full file on GitHub · 535 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. 2mo ago First seen · 535 lines · 6,521 tokens per session scan A cf73caf226e1

Subscribe to this mod's changes

beyond-fable AGENTS.md is an instructions file published in the GitHub repository xikhar/beyond-fable (35 stars, last pushed 4mo ago), licensed MIT. It adds 6,521 tokens to every session, about $0.0261 per session on Opus 5.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-30.

Related

beyond-fable AGENTS.md compared with instructions from other repositories

beyond-fable AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
beyond-fable AGENTS.mdxikhar/beyond-fableInstructions file354mo agoMITA6,521Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot