License & Governance
MJPF is published openly so any Mahjong app can interoperate. The goal is a small, stable, boring format that outlives any one app.
License
Specification & schema: released for free use, implementation, and redistribution. The intended license is a permissive open license (e.g. CC0 for the spec text and JSON Schema, MIT for reference code) so anyone can implement MJPF without restriction. The final license text is confirmed by the project owner at publication time.
- You may implement readers and writers of MJPF in any product, commercial or not.
- You may copy and adapt the JSON Schema and example payloads.
- "MJPF" and "MJQR" name the format and its transport; please don't apply them to incompatible formats.
- No patent claims are made on the format.
Governance
MJPF is currently steward-maintained as part of the Mahjong Coach project. The steward's job is conservative: keep v1 stable, accept additive changes carefully, and never break old readers without a major version bump. Proposals are welcome via the project's public repository (see Publication below).
Versioning policy
- PATCH โ editorial only; no wire change.
- MINOR โ additive only: new optional fields and new capability flags. Old readers keep working โ they ignore what they don't recognize and refuse only a document that requires a capability they lack.
- MAJOR โ a breaking change to the envelope or to the meaning of an existing field. Reserved for last resort; readers refuse a higher major.
The compatibility rules are normative in the spec (ยง3, ยง6). Capability flags are the primary evolution mechanism, so most growth happens in MINOR versions without disturbing anyone.
Design principles (what we say no to)
- No personal data, ever. Game data only.
- No mandatory network. Everything works offline; online features are out of scope.
- No platform lock-in in the core. The portable surface (the
deal) uses only JSON, raw DEFLATE, and base64. - Small over clever. A deal is a seed and a rule set. Resist the urge to grow the core.
Future work โ conformance program parked
A formal conformance / certification program is planned but parked โ it is not part of the active v1 work and is documented for transparency only. It would add:
- A validator (hosted endpoint + offline CLI) checking a document against the schema and the normative rules.
- A reusable GitHub Action wrapping the validator for implementers' own CI.
- An adapter contract and a frozen test-vector corpus per spec version.
- Staged conformance tiers: Tier 1 (deals), Tier 2 (event-log resume), Tier 3 (bit-exact wall determinism across independent codebases).
Tracked in MJPF_FUTURE_WORK.md. None of it gates the reference build today.
Publication
Publishing the spec, schema, examples, and this site to a public location (a hosted site and a public source repository) is a project-owner step. The site is intentionally a set of static files with no build step, so it can be hosted anywhere โ object storage, a static host, or GitHub Pages.