forgeax-engine
AGENTS.md70 starsChanged 18 days agoApache-2.0View on GitHub
AI-first TypeScript game engine; AI is the primary user. Reduce the concepts a reader must hold, not line count. Prefer one authority, derived state and closed unions. Fix the owning subsystem rather than adding a demo workaround or parallel registry. Prefer the better API over compatibility shims; published wire/API changes retain their versioning rules. [!IMPORTANT] A blocked required check stays unverified. Preserve its failure, attempt supported recovery, and report missing evidence. Never substitute a weaker mock or CPU result for…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository25 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- forgeax-engine-appSkill
- forgeax-engine-assetsSkill
- forgeax-engine-audioSkill
- forgeax-engine-cliSkill
- forgeax-engine-debug-drawSkill
- forgeax-engine-debugSkill
- forgeax-engine-ecsSkill
- forgeax-engine-evolveSkill
- forgeax-engine-materialSkill
- forgeax-engine-mathSkill
- forgeax-engine-modelingSkill
- forgeax-engine-navigationSkill
- forgeax-engine-performanceSkill
- forgeax-engine-physicsSkill
- forgeax-engine-render-pipelineSkill
- forgeax-engine-rhi-debugSkill
- forgeax-engine-rhiSkill
- forgeax-engine-sdkSkill
- forgeax-engine-shaderSkill
- forgeax-engine-stateSkill
- forgeax-engine-vfxSkill
- forgeax-engine-wechatSkill
- forgeax-scriptable-pack-reviewSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Read the affected package README and implemented contract.
- Very specific: line 8
Never switch the primary checkout's branch.
- Very specific: line 27
Start with relevant build/type/unit/lint checks.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Engine working rules
AI-first TypeScript game engine; AI is the primary user. Reduce the concepts a reader must hold, not line count. Prefer one authority, derived state and closed unions. Fix the owning subsystem rather than adding a demo workaround or parallel registry. Prefer the better API over compatibility shims; published wire/API changes retain their versioning rules.
Start with the task
- Read the affected package README and implemented contract.
@forgeax/engineis the public runtime/CLI umbrella;packages/<owner>retains implementation ownership. Do not infer APIs from architecture summaries. - Never switch the primary checkout's branch. Commit in an isolated
.worktrees/<branch>worktree; preserve unrelated changes, active sessions and shared resources. Remove your clean worktree after delivery.
Implementation
- ESM-only TypeScript, strict flags from
tsconfig.base.json. Schemas declare components/resources/events. Expected failures return structuredResult; closed error-code unions and discriminated details remain source-owned and exhaustively handled. - Runtime modules consume explicit host inputs and engine-owned diagnostics; they do not infer development mode from bundler metadata or ambient process environment. Tool and platform adapters own those inputs. Run
pnpm check:runtime-boundariesand its built-output counterpart before delivery. - English-only source and agent guidance. Follow Biome, package naming and
packages/runtime/README.mdnaming rules. Avoid redundant wrappers, state copies and compatibility paths; wire/error-code compatibility follows the documented version boundary. - Tests belong in the nearest owning
__tests__/; runner-specific filenames andbench/*.bench.tsfollow the reference. Add a same-path regression gate for a reproducible bug; reproduce it red, fix its owner, then pass relevant checks. - Fix vulnerabilities in the owning manifest/version policy and lockfiles, not installed/cache artifacts; verify a fresh consumer. Keep
pnpm-lock.yamlandbun.locksynchronized; usepnpm sync:checkand channel-alignment checks when those inputs change.
Evidence and checks
[!IMPORTANT] A blocked required check stays unverified. Preserve its failure, attempt supported recovery, and report missing evidence. Never substitute a weaker mock or CPU result for runtime, pixel, GPU, browser or device acceptance.
- Difficult rendering failures start with RHI Debug: capture the actual failing frame before speculative shader edits. Explicit startup/asset/schema errors go to their named owner.
- Basic initialization,
pnpm build:engineand CPU tests need no Dawn toolchain. Engine/RHI/hello changes retain the maintained 60 completed-frame core smokes,pnpm test:browserandpnpm test:dawn; browser-path failures need browser evidence. Longer soaks are opt-in. See CI operations andscripts/ci/dawn-smoke-roster.json. - Chromium launches must set
chromiumSandbox: true; repair an unprivileged runner rather than passing sandbox-disabling flags. Use the user's exact SSH endpoint for a runner target, without guessing a nested container. - CI keeps approximately 80% core validation, at most four actual jobs per matrix, and a 30-minute execution target (queueing reported separately). Reproduce locally, use
pnpm ci:focus, then complete CI on the final PR commit. Retry only failed jobs for proven external transport failures. CI changes update the operating guide and affected skill routes. - Start with relevant build/type/unit/lint checks; shortcuts do not replace required acceptance. Use
pnpm test:layoutfor moved/added tests. Metrics followschemas/forgeax-metrics.schema.json; quality ratchets and full commands live in the CI guide/reference.
Read details only when needed
| Task | Contract |
| Package ownership or lifecycle change | Module design map, then owning README |
| Asset authoring / publication | Asset authority schema, Pack README and asset skill |
| SDK / npm release | Release contract and SDK skill: Candidate -> Promotion; promotion consumes sealed bytes and never rebuilds or pre-creates version tags |
| Public SDK source | .forgeax-public-distribution: no private asset/submodule requirement; checked WASM payloads and pnpm build:engine remain sufficient for source build; see source-mode details |
| View / tool integration | View source contract; View is a fixed gitlink, Harness floats; runtime packages do not depend on View/React |
| Game / CLI work | CLI skill; forgeax is the public entry, required templates target a directory outside the SDK root |
| Build setup / commands / test naming | Contributor reference and CONTRIBUTING |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

