# Working with agents How to keep every agent (a Claude Code session, a subagent it launches, another model) aligned with the [charter](charter.md) and the [methodology](methodology.md). The short version: every session under `/data/emu` loads a small `CLAUDE.md` that points here, and every brief names the agent's tier, its gate and its limits. ## 1. Make every session start aligned Claude Code reads `CLAUDE.md` files from the working directory and the directories above it. A file at `/data/emu/CLAUDE.md` therefore reaches every session in every project of the family. Install the one kept here (`docs/CLAUDE.md`) once: cp /data/emu/emulator-lineage/docs/CLAUDE.md /data/emu/CLAUDE.md and copy it again when this repository's version changes. It is deliberately short: it states the rules that must never be missed and sends the agent here for the rest. Project-specific instructions (a gate command, a known trap) can go in a project's own `CLAUDE.md`; keep the family rules in one place. ## 2. Brief an agent by its role An agent works in one tier at a time. Its brief says which, names the gate, and says what it may not touch. The roles and their limits: | Role | Works in | May | May not | | --- | --- | --- | --- | | Research | Phase 0 docs, `reference/` checkouts | gather evidence, pin oracles, run other emulators as black boxes, write the handoff brief | write emulator code; open GPL source while drafting code | | Specification | `x-python` | define and fix hardware behaviour, with evidence tags; add tests and validation records | make the specification complicated for speed | | Transcription | `x-rust` | translate the specification line by line; extend the lockstep gate | change behaviour; fix a reference bug downstream (report it upstream with a repro) | | Optimisation | `x-rust-fast` | exact speed-ups and deterministic threads, each gated and measured across layouts | keep a change that does not pass the per-cycle gate or does not win on every layout | | Turbo | `x-rust-turbo` | restructure execution behind the observable contract; add named concessions, off by default | let a fast path or a concession redefine behaviour; edit the inherited fallback code | | Host | `play-x`, `x-play` | presentation, input, capabilities, adaptive settings | change emulation; ship firmware or artwork that is not freely licensed | A brief that works (the Super Game Boy work of 2026-11-13 used this shape): You are in (), part of Aubrey's emulator family under /data/emu. Read /data/emu/emulator-lineage/docs/charter.md, then 's README and docs/status.md. Goal: . What exists: . Scope: . Gate: . Evidence: . Limits: . Report: commits, every count, what is unverified, provenance notes, open items. Give it the facts it cannot discover cheaply (a toolchain trap, an environment variable, where a romset lives) and leave it the judgment calls. Ask for a report that separates what was verified from what was assumed. ## 3. Review what comes back An agent's report is a claim, not a result. Before building on it: - Re-run its gate yourself, or at least its decisive count (the Super Game Boy's picture comparison and test count were re-checked before transcription began). - Look at one picture or one trace with your own eyes when the work is visual. - Check the claims sit on the right axis: "matches the Python" is fidelity, "matches the hardware" is confidence. - Check provenance notes: anything written with an emulator's source open is named. - Downstream findings go upstream first (the transcription that found the SGB skip-boot bug reported it; the fix went into gameboy-python, then down). ## 4. What every agent should leave behind - Commits with plain messages ending in the model's attribution line. - Updated numbers in `README.md` and `docs/status.md`, with the commit they were measured at. - For a fast or turbo change: the A/B numbers per layout, and the not-kept entries. - For a behaviour change: the evidence tag on the code and the validation record. - A status note the next agent can start from. ## 5. The charter is not the agent's to change Agents never edit the charter, the methodology, this file, the shape statements in families.md or `docs/CLAUDE.md` on their own initiative, and never to make their own work fit. A needed change goes in the agent's report as a proposal, with the reason and what it would affect; Aubrey decides (charter.md, "Changing this charter"). Facts that have moved (a count, an out-of-date row) may be corrected and reported. ## 6. When Aubrey is away Agents work autonomously within their brief: commit locally, run gates, keep measuring. They do not push to public repositories, tag, deploy or post outside the family unless the brief or a standing instruction says so; they leave the exact command for Aubrey. Policy questions wait for him; chip-level technical choices are made, marked provisional, and reported.