# Adding a tool Applies to both repositories (`emu-tools` and `emu-tools-gpl`); the GPL repository's own `docs/adding-a-tool.md` adds its upstream rules. ## Which repository - Links, includes, patches, or declares the API of a GPL, LGPL or MPL program (including ctypes declarations taken from its headers, and harnesses compiled against it): **emu-tools-gpl**. - Everything else (our own tools; runners for permissive programs; hardware tools): **emu-tools**. - Non-commercial or AI-objecting authors' code: neither (see `wall.md`). ## Layout ``` tools// README.md what it measures, the machines it knows, build, command line, outputs CHANGELOG.md one line per change, with the tool version build.sh one command builds it (fetching pinned upstreams if any) each with an SPDX header tests/ a smoke test that runs without commercial ROMs (homebrew or synthetic) ``` ## The bar - Follows `contract.md`: the command line conventions, the manifest, the formats. - Versioned (`--version`); consumers pin a version or commit. - ROMs and firmware only by path or environment variable; nothing committed. - No machine paths; no secrets. - The README states the evidence its outputs carry (OBSERVED for emulators and models, MEASURED for hardware) and the known differences from hardware, if any.