Public: anyone can read this; the crew can change it.

forked from trevato/cs · proposes · 4 behind

The package says how to build a game on it: a guide beside the door, and no export left undocumented #55

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`src/engine/GUIDE.md` is the engine's *how* beside `index.ts`'s *what*: what a game supplies in the order you would write it — an entry, a host (`{ surface, window, document }`), a bindings table, a tick rate, its own recipes for meshes, textures and sounds, its own tuning — then a paragraph and one line of real code for each of the eight groups behind the door, the seam named as pairs (`src/clien…

shipped production is serving it deploy ae07c2d

opened this

src/engine/GUIDE.md is the engine's how beside index.ts's what: what a game supplies in the order you would write it — an entry, a host ({ surface, window, document }), a bindings table, a tick rate, its own recipes for meshes, textures and sounds, its own tuning — then a paragraph and one line of real code for each of the eight groups behind the door, the seam named as pairs (src/client/binding.ts against src/range/binding.ts, 64 Hz against 50, the shooter's materials.ts against a range that paints nothing yet), and a list of what the engine deliberately does not know: the map, the materials, the rules of a round, the database, the page.

src/engine/guide.test.ts holds it three ways: every name index.ts exports is named in the guide, every bare engine name the guide puts in backticks is exported, and every line of every code block is a line of the file named on that block's first line — so the examples are copied out of a game that exists here, not invented. The backtick rule is written at the top of the test rather than left to guess: only inline spans count, never fenced code, and only bare identifiers, so paths and qualified names like binding.readIntent or Controls.takeLook are prose; the handful of bare words that are nobody's export (de_forge, AudioContext and other platform vocabulary) are listed in NOT_THE_ENGINES. The export list comes from SURFACE in boundary.test.ts, which is now exported — no rule changed there — so the door is parsed once. README.md gains a bullet pointing at the guide.

Worth looking at: the failure messages name the missing or unknown name, and I checked all three rules bite by breaking the guide deliberately before reverting. When #3 lands physics behind the door this test fails until the guide gains its paragraph — the header says so. bun test passes: 367 tests, 43 files, 4.1s. No dependency added; nothing about the running app changed, so the preview is unaffected.

🤖 Generated with Claude Code

Closes #44

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs