Pre-Flight — WP-006 — 2026-11-13

Filled-in copy of docs/reference/pre-flight for WP-006. Verdict at the bottom.

Written before the first probe. The session continues the WP-001/WP-004/WP-005 session on Jeff’s “continue” after PRs #34 and #35 merged. The tgifile-art next steps name this run as step 3.


Pre-flight intent

Validating readiness for WP-006. Verdict only.

Dependency check

Prereq Status in WORK_INDEX Locked on Notes
none listed (Depends on: —) n/a n/a  
WP-001 (informs) ✅ Done 2026-11-13 The header layout and --verify engine checks this run uses
WP-002 (informs) ✅ Done 2026-11-13 tools/probe_art.py, the cel decoder
WP-004 (informs) ✅ Done 2026-11-13 tools/probe_audio.py; see the scope amendment below

Repo + disc state

Phantom:  C:\dev\scooby-engine\tools\exes\phantom\
Showdown: C:\dev\scooby-engine\tools\exes\showdown\

Scope lock

Allowed paths for WP-006:

docs/01-VISION.md                          (Engine Lineage Phantom text only)
docs/formats/tgifile-art.md                (engine-generation line, Cross-title verification, Remaining unknowns, Next steps)
docs/formats/scooby-exe.md                 ("Pending: Phantom archive format" subsection only)
docs/formats/audio-archives.md             (cross-title line only; see amendment)
docs/work-packets/WP-006-phantom-archive-format.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-006-2026-11-13.md
tools/probe_art.py                         (only if a Showdown-only assumption blocks the Phantom run)

Scope amendment: WP-006 lists “anything else on the Phantom disc” as out of scope. Running tools/probe_audio.py --verify on Phantom’s three .dat files costs one command and answers whether WP-004’s format holds for the second Gen 1 title. It is added here and reported separately from the archive verdict.

Local-only: rendered PNGs, decoded audio and any listings stay in the session scratchpad.

Forbidden: game data, decoded images or audio committed anywhere; engines/scooby/**.

Exit check: git diff --name-only origin/main..HEAD before opening the PR.

Risk review

Risk Likelihood Impact Mitigation
Verdict on a 4-byte coincidence (the opening u32 happens to look like a room count) low high The WP’s own rule: the verdict needs the structural checks. This run goes further and runs the full --verify (every cel decoded, descriptors, name table, sequences, placements).
Showdown-only assumptions in the tooling (the 20-name character table at 0x46A720 is Showdown’s) med med --verify does not use the character table. A Phantom --room render does, so any render is labelled with that caveat, or the table is read from Phantom’s own Scooby.exe.
A failing check read as a format difference when it is a tool assumption (e.g. “0xB0/0xB8 tables empty” is a Showdown observation, not a format rule) med med Read each failure before deciding. A populated table is a finding about Phantom’s data, not a reason to call it another generation.
Copyright leak low high Images and audio stay in the scratchpad

Verdict

Rationale: no prereqs; inputs cached and SHA-locked; the tools exist.

Prepared by: Claude (WP-001 session, continuing), on Jeff’s “continue” of 2026-11-13 Date: 2026-11-13


After execution — lessons learned

Lesson: a “magic number” can be a count. The WP’s Gen 1 marker 45 00 00 00 was Showdown’s room count. Phantom opens with 35 00 00 00 and is still Gen 1. Run the 4-byte test alone and it reads “not Gen 1”. Fixed offsets taken from one title (0x0F60, 0x0118) fail the same way once a count changes. The header walk and the full --verify are the test.

Lesson: comparing code is cheap once one binary is labelled. Masking absolute addresses and call targets and comparing the 71 WP-001 functions took one script and settled “same engine build”, not just “same file format”. Do this for any title with a labelled sibling before opening Ghidra on it.

Lesson: a strict check found real data. --verify failed on Phantom over a field Showdown leaves at zero. Reading the two failing steps, rather than loosening the check blindly, turned up a plausible per-step offset that the engine ignores.

Scope note: the lock held. Edits stayed in the listed files. The tools/probe_art.py change is the one the lock allowed: a Showdown-only assumption (step word always 0) that blocked the Phantom run.