Files
goldeneye-pc-port/CLAUDE.md
T
James Dansereau 9d118e0b13 M-13: 21-level sweep matrix + D123 (C1 fix) + D124 (C2 Jungle fix)
WS4 level sweep driven to completion: 12/21 solo levels PASS
(load + render + no-crash). Full matrix in docs/LEVEL-STATUS.md,
reusable runner tools_pc/level_sweep.sh, WS6 checklist docs/LEVEL-PLAYTEST.md.

Fixes:
- D123 (tools_pc/d88_propdefs.py): crash class C1 on 6 levels
  (Dam/Runway/Frigate/Statue/Streets/Cradle). D122 fallout - the widened
  Vehichle/AircraftRecord.ailist slot was zeroed instead of carrying its
  read-before-write integer AI-list id, so prop.c -> ailistFindById(0) ->
  GAILIST_AIM_AT_BOND -> ai() ran a CHR aim list with a NULL chr ->
  chrIsNotDeadOrShot(NULL). New OBJ_ID_WORDS arm. 4 levels -> PASS,
  Runway falls through to C2. BUNKER1/Silo unregressed.
- D124 (port/src/gimgfixup.c): crash class C2 on Jungle. Compiled
  explosion-DL pointer-sync keyed on an IMAGESEG marker that texLoad()
  had already erased -> compiled globalDL_0xNNN arrays kept link-time
  IMAGESEG words -> 0xABCDxxxx into fast3d on first explosion draw.
  Latent on every level. Detect the slot from the compiled array instead.

Diagnosed, NOT fixed (write-ups in PCPortResearch.md SF):
- C2-GDL (D124-Facility addendum): Facility/Runway - model texture-pool
  path yields a garbage tex->data; every model file loads at an odd
  bank base (mempAllocBytesInBank does no alignment). Suspect
  d43_emit.py/pcmodels sidecar texture-blob offsets (N64 8B vs PC 16B Gfx).
- C3/C6 (D125): Aztec/Bunker2/Surface2 - converted propDefs blob in RAM
  doesn't match d88_propdefs.py offline output (garbage after record 0);
  runtime sizepropdef() walk drifts ~100 records -> wrong door/modelid.
  d88_propdefs.py convert_stream + sizepropdef() PORT strides verified
  correct; suspect a dest-offset/pd_end bug in d88_emit.py propdefs emit.

Remaining: 9 crashes / 6 classes (C2-GDL, C3/C6, C2m Jungle G_MTX,
C5 Control BG portal, C4 Depot BG tile/room, C7 Surface1 sndSetupSound).
Priority order in docs/LEVEL-STATUS.md.

Also folds in the in-progress docs restructure (HANDOFF/AGENTS/CLAUDE,
PCPortResearch D121/D122 SF/SH entries, PLAN-linear-level-sweep,
HANDOFF-ARCHIVE, BACKLOG).
2026-08-29 16:36:18 -04:00

3.1 KiB

CLAUDE.md — GoldenEye 007 PC port

This file auto-loads every session. It is the operating manual. The full rules are in AGENTS.md (imported below); this file adds the two checklists that were being skipped.

@AGENTS.md

Doc load order — read deliberately, not everything

Context is scarce. Load by tier; do not blind-read whole files.

  • Tier 0 — always (auto-loaded): CLAUDE.md, AGENTS.md. Nothing else auto-loads.
  • Tier 1 — every session start, read fully (both are short): docs/HANDOFF.md (current state + next task + environment), docs/PORT-LEARNINGS.md (recurring bug classes).
  • Tier 2 — on demand only, do NOT read start-to-finish:
    • docs/PCPortResearch.md §1–§10 — architecture / RSP deltas / phased plan. Read the section you need.
    • docs/PCPortResearch.md §F + §H — the Dxx finding log. Jump to a specific Dxx via the index at the top of §F. Never linear-read.
    • docs/HANDOFF-ARCHIVE.md — prior-session narrative (M-2…). Only when tracing the history of one fix.
    • docs/AGENT-WORKFLOW.md — before dispatching a subagent (also Tier 1 if you may dispatch this session).
    • docs/PLAN-linear-level-sweep.md — the active plan of record.

Session preflight — do this in your FIRST few tool calls, before acting

Having a concrete "next step" from the handoff is NOT license to skip this.

  1. Read the Tier 1 docs: docs/HANDOFF.md (immediate task, standing procedure, environment gotchas) and docs/PORT-LEARNINGS.md (recurring bug classes — you will re-derive catalogued bugs if you don't).
  2. Skim docs/PLAN-linear-level-sweep.md — the active plan of record.
  3. If you may dispatch a subagent this session, read docs/AGENT-WORKFLOW.md NOW — not at dispatch time.

Dispatch preflight — EVERY Agent/Task spawn, no exceptions

A subagent brief is INVALID and must not be sent unless it contains all of:

  • FILES YOU MAY TOUCH — disjoint from every other running agent.
  • BUDGET — <= N build->run->inspect cycles or ~M min. Tight for cheap-class bugs (truncations, off-by-ones); more room for structural ones (matrix handedness, format specs). Escalate the default as the project hardens.
  • ON EXPIRY — stop, revert temp probes, write up what you have in docs/PCPortResearch.md §F with an explicit confidence rating. A good write-up of a half-solved bug is a deliverable, not a failure.
  • KNOWN-GOOD / RULED OUT, CONSTRAINTS (no game-logic changes; ABI/layout/format only; #ifdef PORT; documented in §F), REPORT shape.
  • Instruction to read docs/PORT-LEARNINGS.md first and append any generalisable quirk to it.

Full template: docs/AGENT-WORKFLOW.md -> "Standard investigation-subagent brief template".

Verification cadence (integrator / overseer)

  • Per merged patch: single-frame GE_PCDUMP capture diffed against the committed golden baseline. Cheap. Do NOT gate every patch on a long soak.
  • Per batch / integration checkpoint: one 60s -level_09 crash-free run.
  • Subagents on small disjoint subsystems (input, audio, saves, converters) don't run the game — the overseer verifies.