# Compatibility policy

What may and may not change in the Lua API and the project file format between releases.

Source: https://zenestudio.org/docs/scripting/compatibility-policy

Markdown version of the Zene Studio page at https://zenestudio.org/docs/scripting/compatibility-policy. For a map of the whole site, see
https://zenestudio.org/llms.txt.

---
Two things in Zene Studio can break your work between releases: the **Lua API** and the **project
file format**. This page states what we promise about each.

## The Lua API

The Lua API is **versioned**, and the policy is:

- The API declares a version.
- Changes **within** a version are additive.
- **Breaking** changes land in a new version, with a stated migration path.

:::note
This is a stronger promise than an alpha usually makes, and it is intentional. A scripting API that
changes silently is worse than having no scripting API at all, because you find out at the worst
moment.
:::

### What is *not* promised in an alpha

- New commands and new Lua bindings may appear in any release. Additions are not breaking, but code
  that enumerates the API surface and asserts an exact size will break.
- Defaults and edge-case behaviour may be corrected.

### What *is* promised

- A function that exists in version N with a documented signature keeps that signature within
  version N.
- If something must break, the version increments and the migration is written down.

## The project file format

`.mmp` and `.mmpz` are **XML**, which is the durable part: you can read them, diff them, and put them
in version control.

The format, however, is **not yet stable**. A project saved by one build may not open in a later or an
older one.

:::warning
**Keep backups.** This is not advice we enjoy giving, but the format stability guarantee does not
exist yet. Use [version control](/docs/files/version-control) — it costs nothing and it is the only
thing that reliably gets your project back.
:::

## Practical rules

1. **Commit before every risky experiment.** `git commit` is the cheapest undo there is.
2. **Pin the application version** in a project you depend on.
3. **Version-gate your Lua** at load time.
4. **Read the release notes** before upgrading a machine you work on. Each one lists what changed and
   what it broke.