Sonder_Engine AGENTS.md

Editing guidance for Sonder Engine, a game engine with documented rules for its design, data storage, processing pipeline, and tests. It tells coding agents where to look before changing behavior.

In plain words
What is it for?
Useful for planning and implementing engine changes, tracing handlers, updating persistent state, modifying model outputs, and regenerating the project's code map.
Why use it?
It helps agents find the authoritative documentation and nearby tests first, reducing changes that conflict with the engine's design or break stored data.

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/n0819/sonder_engine/agents-md
Clone the repo
git clone --depth 1 https://github.com/N0819/Sonder_Engine

Made for: Codex, OpenCode.

Per session 27,758 This file is loaded in full into every session.
When invoked 27,758 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.27758 $0.27758
Opus 5 $0.13879 $0.13879
Sonnet 5 $0.05552 $0.05552
Haiku 4.5 $0.02776 $0.02776

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

Security

Grade A, and why

Sonder_Engine 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 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.

AGENTS.md · 696 lines

How it starts

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

Editing Guide for Coding Agents

This file is the operational map for changing Sonder Engine safely. It is written for both human contributors and AI coding agents.

First-pass orientation

Before editing behavior:

  1. Read Design.md § Genre-agnostic substrate, world-specific law before adding or specializing a mechanic.
  2. Read docs/guides/PIPELINE.md for execution order and ownership boundaries.
  3. Search docs/CODE_MAP.md for the handler or function involved.
  4. Read docs/guides/DATABASE.md before changing persistent state, archives, or restore paths.
  5. Read the relevant schema in llm/schemas.py before changing any model output.
  6. Read the corresponding commit function before adding fields that should persist.
  7. Read docs/guides/TESTING.md, find the nearest regression test, and run the narrow test first.

docs/CODE_MAP.md is generated; never hand-edit it. Regenerate and verify it after moving or adding functions:

make map
make structure

AGENTS.md, Design.md and everything in docs/guides/ are the maintained guidance set — current implementation authority, changed in the same commit as the behaviour. docs/design/, docs/experiments/ and docs/archive/ are context rather than authority: a design note argues for one subsystem, an experiment record reports one unrepeatable run, and an archived document has been superseded. Check any of their claims against source and the maintained guides before acting on them. docs/README.md is the index and says which is which.

Edit routing

Charter identity changes route through world/charter_identity.py, world/charter_model.py and world/charter_runtime.py. The Charter/body dict key is permanent identity. A generated personal name is materialized once; profile edits affect only unnamed future bodies. A pool sizes the law's phonology, never the population: the allocator spreads each spread_components element breadth-first (family, because recurrence inside one generated population implies kinship nobody authored, plus any component address_components says the law calls people by alone) — authored pool values first, then the extension lane (extension_profile: the profile's own syllable parts, else parts derived from the pool's own words by derived_name_parts), with reuse only once the whole reachable space is spent. Spreading is preference; name_is_reserved stays the only refusal beside components_repeat (a name may not double its own component). No pool means no derivation — the no-implicit-default doctrine is unchanged, and both minting paths (materialize_body_names and story/naming.minted_presence_name) share the extension. Rank/post titles are aliases, and transcript color derives from the permanent identity so title changes and promotion do not repaint the person. Name learning must still prove an exact delivered line and physical co-location; index the roster once per beat rather than scanning a large institution once per quote.

Read the full file on GitHub · 696 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 · 696 lines · 27,758 tokens per session scan A d0845e0f34bc

Subscribe to this mod's changes

Sonder_Engine AGENTS.md is an instructions file published in the GitHub repository N0819/Sonder_Engine (57 stars, last pushed 4d ago), licensed MIT. It adds 27,758 tokens to every session, about $0.1388 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.