Pre-Flight — WP-001 — 2026-11-13
Filled-in copy of docs/reference/pre-flight for WP-001. Verdict at the bottom.
This copy was written at the end of the execution session, not ahead of it. The session was started from another Claude session with Jeff’s brief, which stood in for a session prompt: Ghidra is now installed, so run WP-001 against the narrowed Step 5 targets. The brief’s first instruction was to check that headless Ghidra works; it did. The WP-002 lesson (“write the pre-flight before the first probe”) was not followed. See §Lessons learned.
Header
- WP:
WP-001 - Title: Ghidra session:
Scooby.exeimports +TGIFILE.ARTdecode trace (Step 5 narrowed 2026-11-13) - Pre-flight date:
2026-11-13 - Targets generation(s): Gen 1 (Showdown), per vision §Engine Lineage. Every finding is stated for Showdown; Phantom is not loaded.
- Targets disc(s): Showdown, from the cached binaries; no re-mount needed
Pre-flight intent
Validating readiness for
WP-001. Verdict only.
Dependency check
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-003 | ✅ Done | 2026-06-02 | Name-table baseline. WP-001 corrected its start and record format. |
| WP-007 | ✅ Done | 2026-06-02 | Strings and imports; Step 3 is a cross-check |
| WP-002 (informs the narrowed Step 5) | ✅ Done | 2026-11-13 | Image decode solved from data; removes the decode as a target |
| WP-009 (informs target 5) | ✅ Done | 2026-11-13 | Scene index = ROOM id; scenes 18/19 left open |
| WP-010 (debug channel names for labels) | 📦 Queued in this index | n/a | Not a WP-001 prereq. The channel names (resource, graphics, audio, script, input) were given in the brief as fixed by WP-010’s engines/scooby/detection.h on barefootbetters/scummvm branch scooby-engine. They were used as given; that branch was not opened in this session. |
Repo + disc state
- Working tree clean; HEAD on branch
claude/keen-diffie-58f61catcf1c45d(=main) - Inputs cached in the main checkout’s gitignored
tools/exes/showdown/(the worktree has no copy):Scooby.exeSHA-2561328454334CDDB9518168B78BA7FFEB13BA7B772E6B52F4E2B87098D18AF7478, re-hashed this session and matching scooby-exe §Binary identityTGIFILE.ARTSHA-256B3006E12…C807, checked byprobe_art.pyon loadobject.ini,Sfx.dat,Voice.dat,Music.datfor theobject.iniand sound-id cross-checks
- Ghidra
.gpr: none existed, so a new one was created atC:\dev\scooby-engine\ghidra\scooby.gpr, which is gitignored (ghidra/) - Doc-vs-binary cross-check (the WP-003 lesson):
u32 @ 0x0000= 69 andu32 @ 0x0118= 453, astgifile-art.mdstates. The doc’s “453 × 8-byte object descriptors” claim failed once the engine’s parse order was read: the table is 453u32. That failure became the session’s first finding. - Tooling: Ghidra 12.1.4, Java 27.0.1 (Ghidra needs 21+), Python 3.12 with
pefileand Pillow
Showdown: C:\dev\scooby-engine\tools\exes\showdown\{Scooby.exe, TGIFILE.ART, object.ini, Sfx.dat, Voice.dat, Music.dat}
Ghidra project: C:\dev\scooby-engine\ghidra\scooby.gpr
Scope lock
Allowed paths for WP-001:
docs/formats/tgifile-art.md
docs/formats/scooby-exe.md
docs/formats/audio-archives.md (index-table lead subsection, status line, unknowns only)
tools/probe_art.py (header parse, cel flags, mask rendering, --verify checks)
tools/ghidra-scripts/** (label list + apply script; addresses and names only)
docs/work-packets/WP-001-ghidra-session.md
docs/execution-checklists/EC-001-ghidra-session.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-001-2026-11-13.md
Local-only (gitignored or outside the repo, never committed): the Ghidra project, the full decompilation dump and other scratch output (session scratchpad), and decoded PNGs.
Forbidden: game data, decoded images, raw decompiler output or disassembly listings; engines/scooby/**.
Exit check: git diff --name-only origin/main..HEAD before opening the PR.
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Copyright leak: decompiled code or binary-derived bulk output committed | med | high | The full decompilation stays in the session scratchpad. The docs carry addresses, names, __FILE__/error strings as anchors, and one restated pseudo-C function (the WP-001 exit criterion), not pasted decompiler output. tools/ghidra-scripts/ holds only addresses and our own names. |
| Inference vs evidence: a code reading written up without a data check | med | high | Every data-side reading taken from the code is checked across the whole file by probe_art.py --verify (descriptors, name table, sequences, room tables, placements, mask partition), or by a one-off count cited in the doc. Inferences are labeled. |
| Inherited spec drift: building on WP-003’s header and name-table reading | high (it happened) | high | Old readings retracted in place with the counter-evidence, labeled WP-001 and dated |
| Generation conflation: stating “the engine does X” for Phantom or later | low | med | All findings are scoped to Showdown’s SHA-256; Phantom is called out as untested |
| Session sprawl: following game logic past the WP targets | med | med | Out-of-scope leads (character actors, per-room classes, Bink, saves, audio codec) logged as follow-ups in scooby-exe.md, not pursued |
Verdict
- READY TO EXECUTE
- NOT READY
Rationale: the prereqs are done, the binary identity is locked by SHA-256, Ghidra runs headless, and the scope lock keeps decompiler output and game data local.
Prepared by: Claude (WP-001 session), on Jeff’s brief of 2026-11-13 Date: 2026-11-13
After execution — lessons learned
Lesson: a table’s size should come from the parser, not from where the next readable thing appears. WP-003 sized the object table by eye. The bytes after 453 u32 looked like a continuation of the table, because a name count and the first room names start with small integers. The engine’s constructor reads count, array, count, array, count, records. One look at the parse order would have placed every later structure correctly. For any header table, find the code or the count that bounds it before documenting it.
Lesson (repeat): write the pre-flight before the first probe. WP-002 recorded the same lesson and this session repeated the miss. A session started from a brief should write this file first. The pre-flight template could say so in its header, so a brief-started session sees it before it starts work.