Pre-Flight — WP-077 — 2026-11-19

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

Nothing on main, in the fork or in an open PR touches ROOM_Wizards_Skull or ROOM_P25_Wizards_Library (checked 2026-11-19: no WP-077 packet, no wp-077 branch local or on origin, only the WP-011 docs PR #130 open; the fork’s scooby-engine is at a709d6d94f with WP-076 and the well-fix merged).


Pre-flight intent

Validating readiness for WP-077. Not implementing, not editing engine code, not annotating Ghidra. Verdict only.

Dependency check

The first room of the Phantom audit’s group 8, Upstairs — the first sub-bullet pairs the wizard’s skull (the Skull Puzzle room) with the wizard’s library (the spell-book shelf that reveals the skull combo). Its one geography dependency, the magic mirror room / royal gallery, landed in WP-072.

Prereq Status in WORK_INDEX Locked on Notes
WP-018 ✅ Done 2026-11-14 Hotspots and exits: the library’s hotspots and the ways between the rooms.
WP-021 ✅ Done 2026-11-14 Clickables: the four rotating skulls and the library shelf answer a click.
WP-023 ✅ Done 2026-11-14 The inventory: OBJ_INV_SPELL_BOOK.
WP-031 ✅ Done 2026-11-14 Big Head — ROOM_Big_Head, the library’s spell-book reveal of the skull combo (startBigHead).
WP-057 ✅ Done 2026-11-16 Phantom’s new game and first room — sets the fixed flags and SkullCombo0-3.
WP-072 ✅ Done 2026-11-18 The magic mirror room — the skull’s exit target (ROOM_P08_Magic_Mirror_Room) and the OBJ_P08_TO_WIZARDS_SKULL way in.

Rule check: every prereq is ✅ Done. Phase ordering holds — this is a Phase 4 (game-logic) room port on top of the resource and front-end lanes already closed.

Repo + disc state

Scope lock

Allowed paths (this repo):

docs/formats/scooby-exe.md                       (the wizard's skull and library)
docs/work-packets/WP-077-wizards-skull.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-077-2026-11-19.md

Fork: engines/scooby/**, staged by name. New files wizards_rooms.{h,cpp} and wizards_check.cpp; a factory line, the module entries, the check’s declaration and its call. No edit to a sibling room expected: WP-072’s magic mirror room already builds OBJ_P08_TO_WIZARDS_SKULL and is the skull’s exit target, and ROOM_Big_Head (WP-031) already exists. Both rooms already have their room_setup entry (music + opening) — no room_setup edit. If the trace surfaces a one-line hook into a sibling class, it is staged by name and called out at execution, not silently widened.

Forbidden: game data from the discs (copyright — never commit); engines/scooby/** beyond the files above; ScummVM upstream paths outside engines/scooby/.

Risk review

Risk Likelihood Impact Mitigation
Ghidra’s underscored labels mask the dotted clip names (the WP-074/075 trap). med medium Read the string bytes (StrAt) and probe the disc’s sound index; probe the numbered/voice lines by prefix (Sound::hasClipPrefix), keep exact findClip for flat sfx ids. A found 0 on a name that is right is the tell.
The Skull* flag block is not the Scooby.ini / kPhantomFixed list order (the WP-076 trap). med high Anchor each flag by the function that touches it: SkullPuzzle (0x257) set by the solve-tick; SkullMovie (0x258) by the hand-demo entry; SkullPuzzleAttempted (0x259) by the attempt entry. Never infer offset→name from the list. The second trace is handed raw addresses, not this map.
The skull puzzle is the largest class of the group (463 lines): the wizard hand-demo tick is an easing state machine. med medium Port the tick state machine faithfully (5 px/tick toward each skull, the HANDLIFT/HANDTURN/HANDRETURN loop, the solve check against SkullCombo0-3). The demo is not on the check surface; the check verifies classes/clips/claims/save-keys/movies/exits.
Shared misreading (reference and engine encode the same wrong trace). low medium Two sessions trace both classes independently (the WP-073/074/075/076 move) and agree before the check is trusted, on top of the engine == reference match and the disc sound-index probe. The second trace is given raw addresses only.
Generation / disc conflation. low medium Every claim is Gen 1 Phantom; Showdown has neither room and the check asserts it prints so.

Verdict

Prepared by: Claude (WP-077 session, drafting + execution in one) Date: 2026-11-19


After execution — lessons learned