Pre-Flight Gate

REFERENCE — Reusable readiness gate. Not an execution prompt.

Subordination (descending authority):

  1. docs/01-VISION — vision, goals, scope, decisions log
  2. docs/02-SCUMMVM-INTEGRATION — upstream integration contract
  3. docs/work-packets/WORK_INDEX — WP + EC catalog and ordering

If this doc conflicts with any of the above, the higher-authority doc wins.


Purpose

A binary readiness gate that runs before a WP execution session is opened. It exists to:

Pre-flight is an audit artifact — fill it in and commit it so a future reader can reconstruct why execution was authorized without re-reading transcripts.

Pre-flight sits inside the broader WP lifecycle. See wp-lifecycle for the drafting steps that precede this gate and the execution + close steps that follow — including the “stale READY when main moves” pattern and the four-state abandonment ritual.

Save the filled-in copy as: docs/reference/pre-flight-WP-XXX-YYYY-MM-DD.md (where XXX is the WP number and YYYY-MM-DD is today’s date). Commit it to main before opening the execution session.


When pre-flight is required

Mandatory for any WP that touches:

Not required for WP/EC body edits that don’t lock a new fact (rewordings, link fixes, status bumps), typo/link/formatting edits to docs/**, or screenshot/reference-image captures.


Template

Replace WP-XXX with the actual WP ID. Every section must carry concrete content; placeholder responses (“N/A”, “TBD”, “none”) invalidate the pre-flight.

Pre-flight intent

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

Dependency check

Confirm every prereq WP listed in WORK_INDEX for WP-XXX is ✅ Done. Read the index directly — do not trust memory.

Prereq Status in WORK_INDEX Locked on Notes
WP-AAA ✅ Done YYYY-MM-DD  

Rule: any prereq not ✅ Done → NOT READY. Phase ordering is load-bearing; do not start a Phase 2 WP while Phase 1 exit criteria are open.

Repo + disc state

ISO / extract paths in use:

<title>: <absolute path>

Scope lock

Anything not explicitly allowed is forbidden.

Allowed paths for WP-XXX:

<glob>
<glob>

Forbidden (any change fails the WP):

Exit check (must run before staging a commit):

# On a feature branch (ScummVM fork, engines/scooby work):
git diff --name-only origin/main..HEAD

# Committing directly to main (docs repo — WP status bumps, format-doc findings):
git diff --cached --name-only

Any file in the output that doesn’t match the allowed list = scope violation. Remediate with git restore, not by widening the allowlist post-hoc.

Risk review

At least one entry required — “none identified” is not acceptable on a mandatory-pre-flight WP.

Risk Likelihood Impact Mitigation
<risk> low/med/high low/med/high <step or guardrail>

Common shapes for scooby WPs:

Verdict

Reviewer: <name> Date: <YYYY-MM-DD>

A READY verdict authorizes opening the execution session. It does not authorize any code change beyond the §Scope lock allowlist.

A NOT READY verdict is itself the audit artifact — keep the saved copy; the next pre-flight cites it.


After execution — lessons learned

If the WP surfaced a preventable gap pre-flight should have caught, record one line in the saved pre-flight-WP-XXX-YYYY-MM-DD.md under a “Lessons learned” heading. If the gap is structural (i.e., it would recur on future WPs), amend this template too.

A WP that closes with “No lessons learned” is a complete and valid outcome — write it explicitly rather than leaving the section blank.