beyond-fable 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

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 instructions/xikhar/beyond-fable/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.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.svg" alt="Measured on agentmods" 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. 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.06521 $0.06521
Opus 5 $0.03261 $0.03261
Sonnet 5 $0.01304 $0.01304
Haiku 4.5 $0.00652 $0.00652

Measured 5d ago against content hash cf73caf226e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 (24 stars, last pushed 2mo ago), licensed MIT. It adds 6,521 tokens to every session, about $0.0326 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-30.

Related

Other instructions, from other repositories

claudemon CLAUDE.md

Instructions for zamarrowski/claudemon, covering ai agent guidelines, project shape, general guidelines, general rules and guards & defensive code.

zamarrowski/claudemon · 7,681 tokens

unity-code-style-guide AGENTS.md

Instructions for krogh-jacobsen/unity-code-style-guide, covering agents.md — unity 6 c, project setup — edit this block, never do these — they corrupt the project, deprecated in unity 6 and if you read nothing else.

krogh-jacobsen/unity-code-style-guide · 4,528 tokens

nes-php-glfw copilot-instructions.md

Instructions for oliverearl/nes-php-glfw, covering github copilot development guidelines for nes emulator, agent document source of truth, project overview, code style & standards and documentation.

oliverearl/nes-php-glfw · 2,719 tokens

game-and-watch-retro-go-sd CLAUDE.md

Claude Code instructions for sylverb/game-and-watch-retro-go-sd, covering claude.md, what this project is, build / flash workflow, architecture and three storage tiers, one elf.

sylverb/game-and-watch-retro-go-sd · 2,946 tokens

base-building-trap-defense-design-agent-skill CLAUDE.md

Instructions for dungnotnull/base-building-trap-defense-design-agent-skill, covering claude.md — skill 250: base-building-trap-defense-design, skill identity, problem this skill solves, harness flow summary and sub-skills.

dungnotnull/base-building-trap-defense-design-agent-skill · 1,910 tokens

trident-mcp AGENTS.md

Instructions for mordor-forge/trident-mcp, covering agents.md, what this is, build and test, single-file verification and e2e tests.

mordor-forge/trident-mcp · 1,465 tokens