Manual Reference

On this page
  1. The short version
  2. What the contract covers
  3. What is not part of the contract
  4. Experimental
  5. How releases work
  6. Writing clients that age well
  7. Project format versions
  8. Coming from pre-release builds
  9. How the contract is guarded
  10. See also

Stability and Versioning

What Mode 8 promises not to break, what is experimental, how releases and deprecations work, and what changed for anyone who used a build before the first release.

Scripts, agents and game projects build on Mode 8, so its surface is a contract: the names, shapes, codes, formats and limits below are pinned by tests, and every change to them is announced. This page says what the contract covers, what it does not, and how a change reaches you.

The short version#

  • Never changed without a new major version: the error envelope, the exit codes, and one name per idea (a CLI flag is always the kebab-case of its MCP parameter and its Studio field).
  • Patch releases fix; minor releases add. A change that could break you is listed in the CHANGELOG under Breaking changes, with what to use instead.
  • A renamed flag still answers: using the old name is a usage error that names the new one.
  • Two things are experimental and may change in any release: the unity export format and the quality score.
  • mode8 schema is the truth for the installed version. The reference pages of this manual are generated from it.

What the contract covers#

SurfaceWhat is stable
CLICommand and flag names, their types, defaults and choices; one JSON report on stdout when the output is read by a program; the report and error shapes; exit codes. See CLI.
ErrorsThe envelope {"ok": false, "error": {"type", "msg", ...}}, the error type names and their documented extra keys, on every surface. See Output envelope.
MCPTool names, parameter names, types, defaults, enums and ranges; result shapes; resources. See MCP tools.
Studio HTTPRoutes, request fields, response shapes, status codes, authentication, body caps and WebSocket event names. See Studio HTTP API.
PythonThe names in mode8.__all__, their parameter names and defaults, the exception classes and their attributes. See Python API.
FilesOutput file names and formats per export format, manifest keys, and the project format: mode8.toml, the asset layout, sidecar keys, the layer stack, the journal. See Engine formats and Project format.
LimitsThe documented caps. A limit may be raised in a minor release, never lowered. See Limits.

What is not part of the contract#

These can change in any release:

  • Text written for people: the terminal summary, help text, the wording of msg and hint, warnings, anything on stderr. Branch on ok, pass, error.type and documented keys, never on wording.
  • The exact pixels. Output is deterministic for a given version, but the drawing and generation improve. A new release may draw a better knight from the same command.
  • Private names: anything starting with _, and modules or functions not listed in the Python API.
  • The Studio's screens. Its HTTP API is stable; its layout is not.
  • Anything marked experimental.

Experimental#

ItemWhereWhat may change
unity export formatmode8 export --formats unity (.meta files for the atlas)File contents and report keys, in any release.
Quality scoremode8 lint --quality, mode8_lint with qualityThe weighting of the 0 to 10 score. The rules, metrics, issues and pass are stable, and so is the score_experimental flag that marks the score.

mode8 schema marks both: the unity format has "stability": "experimental", and the quality section lists score as experimental. When an experimental item becomes stable, that is an addition in a minor release.

How releases work#

ReleaseExampleWhat it may contain
Patch1.0.1Fixes. A fix may turn a crash or a wrongly reported input into the documented error.
Minor1.1.0Additions: commands, flags, MCP tools and parameters, Studio routes and fields, report keys, export formats, error extras, higher limits. A new optional parameter keeps the old behavior by default.
BreakinganyA change of output, default or name that the quality of the art or of the interface needs. The CHANGELOG lists it under Breaking changes with a number and its replacement.
Major2.0.0A change to the error envelope, the exit codes or the one-name-per-idea rule.

When the old name can live next to the new one for a while, it is deprecated first: it keeps working for at least one minor release, its help says deprecated, using it prints a warning (CLI) or adds one to the report's warnings, and the CHANGELOG lists it under Deprecated. A major release may then remove it.

Writing clients that age well#

  • Ignore keys you do not know. Minor releases add report keys, so a check for "no extra keys" breaks on the next update.
  • Pin the version you tested, and read Breaking changes in the CHANGELOG before you update. Run mode8 schema in CI to see surface changes as a diff.
  • Pass optional Python arguments by keyword. Keyword names are part of the contract; positional order is guaranteed only up to the first optional parameter.
  • Check the version when you need a newer feature:
terminal
$ mode8 --version
mode8 1.0.0
$ python -c "import mode8; print(mode8.__version__)"
1.0.0

The schema carries the same version as mode8_version, next to its own schema_version.

Project format versions#

A project has its own format version, version in mode8.toml (currently 1; a missing version means the current format). Mode 8 opens any project that is not newer than the format it knows, and refuses a newer one with a ProjectVersionError instead of damaging it. Update Mode 8 when you see one, and never edit version by hand. See Project format and Troubleshooting.

Manifest files carry versions too: the UI kit and font JSON have format_version and mode8_version, the Godot tile set manifest has format_version, and a layer stack's layers.json has version. A format version rises only in a major release, unless the change only adds.

Coming from pre-release builds#

Mode 8 1.0.0 is the first public release. If you used a build from before it, these changes matter most; the CHANGELOG numbers every one (BC1 to BC23) with its details.

BeforeNow
A format flag that took human or json--json or --human, anywhere on the command line; a terminal gets the summary, a pipe gets JSON (BC14)
Lint failed a sprite whose silhouette strayed from its draftThe match is reported as pose_match and only fails with --min-pose-match (BC6)
gen needed --palette or --colorsBoth are optional: an auto palette sized for the art type (BC4)
A ControlNet preset and gen --strengthRemoved; kleinedit (repaint a draft) and style (prompt only) remain (BC8)
A black outline on every generated spriteAn outline only where the art has none, in its darkest color; --outline-black for black (BC7)
Godot files referenced res://assets/...Paths relative to each file; --godot-res-prefix res://assets keeps the old form (BC13)
Small default canvasesTwice the size: sprites 64x72, portraits and isometric 96x96, mode8 init 64x72; pass --size for anything else (BC3)
Palettes under artkit/palettes/Bundled names only, with material ramps; mode8 list palettes (BC12)
One GIF per exportOne GIF per animation, plus <name>.gif for the idle loop (BC17)
Starter assets brick, blockwall, house; the UI kit and font under godot/art/ (BC15)

An old flag name is never silently ignored: Mode 8 refuses it with a usage error (exit 2) whose hint names the new flag.

How the contract is guarded#

For contributors: these keep the promise honest, and a change to the surface makes them fail until it is reviewed.

  • tests/golden/schema_v1.json pins the whole mode8 schema document, and tests/golden/outputs_v1.json the keys and value types of every command's report, the MCP results and the Studio responses. MODE8_REGEN_GOLDEN=1 with the test run accepts a reviewed change.
  • docs/CONTRACT.md is rendered from the schema (python -m mode8.contract --write docs/CONTRACT.md), and a test fails when it is stale.
  • The generated pages of this reference come from docs/manual/_tools/gen_reference.py, and a test fails when they are stale.
  • Every command shown in this manual is run by docs/manual/_tools/transcripts.py, and site/tools/build_manual.py --check fails when a command, flag or output no longer matches what Mode 8 does.

The reviewer checks that a diff only adds (a minor release) or fixes (a patch). Anything else is a breaking change: it gets a number and a CHANGELOG line with its replacement.

See also#