--- /dev/null
+# openpt tools — getting started
+
+Pure Python 3, no dependencies. **Run from the repo root** (`openpt/`, the dir
+that holds both `tools/` and `PIZZA/`), using the module path `tools.openpt.<cmd>`.
+Paths are relative to the repo root, so the defaults (`PIZZA`, `artifacts`) work
+with no args.
+
+```sh
+cd ~/src/openpt # repo root
+```
+
+## Verify the formats
+
+Decode every shipped `.VGA` and confirm each matches its declared size:
+
+```sh
+python3 -m tools.openpt.verify PIZZA
+```
+
+Expected: `145/145` files with header `size == filesize-8`, and the RLE bias
+probe reporting `lit_bias=1 run_bias=1 -> exact=145`.
+
+## Regenerate all artifacts
+
+Decode every `.VGA` to a grayscale PGM (gray = raw palette index) under
+`artifacts/vga/`:
+
+```sh
+python3 -m tools.openpt.build PIZZA artifacts
+```
+
+## Decode a single image
+
+Grayscale (palette-independent — good for checking geometry):
+
+```sh
+python3 -m tools.openpt.decode_vga PIZZA/Z/ZB1.VGA out.pgm --pgm
+```
+
+Color, using palette N from the palette bank:
+
+```sh
+python3 -m tools.openpt.decode_vga PIZZA/GFX/BACK1.VGA out.ppm \
+ --palette PIZZA/GFX/PALETTE.E --pal 0
+```
+
+Output is PNM (PGM/PPM) — open with any image viewer. (The correct palette per
+image is still an open question; see ../CHECKLIST.md.)
(gray = raw palette index) under artifacts/vga/. As more formats are reversed,
add their regeneration here.
- python3 -m openpt.build [PIZZA_DIR] [ARTIFACTS_DIR]
+Run from the repo root:
+ python3 -m tools.openpt.build [PIZZA_DIR] [ARTIFACTS_DIR]
"""
import glob
"""CLI: decode a .VGA image to PNM.
- python3 -m openpt.decode_vga <file.vga> <out> [--pgm] [--palette F.E] [--pal N]
+Run from the repo root:
+ python3 -m tools.openpt.decode_vga <file.vga> <out> [--pgm] [--palette F.E] [--pal N]
Default output is PPM (color) using palette N from gfx/palette.e. With --pgm,
or when no palette is given, output a PGM where the gray value is the raw
For each gfx/*.vga and z/*.vga: read header (w,h,size), confirm size == filesize-8,
decode the payload, and check the decoded length reaches width*height. We probe
the four plausible count-bias combinations so the *data* tells us the exact
-semantics rather than us guessing. Run: python3 -m openpt.verify <PIZZA dir>
+semantics rather than us guessing. Run from the repo root:
+ python3 -m tools.openpt.verify [PIZZA dir]
"""
import glob