---
phase: 06.2-gap-closure-d-50-d-53-uat-2026-05-13
plan: 04
subsystem: research-doc
tags: [research, read-only, D-53, spawn-delay, legacy-spec, REQ-CLI-04, REQ-CLI-08]
requires: []
provides:
  - legacy-source-of-truth-spec-for-06.2-10-spawn-delay-impl
affects:
  - 06.2-10-PLAN.md (consumer)
tech-stack:
  added: []
  patterns:
    - "Extract-then-document workflow per CLAUDE.md Hard Rule #6"
key-files:
  created:
    - .planning/phases/06.2-gap-closure-d-50-d-53-uat-2026-05-13/06.2-04-SPAWN-DELAY-LEGACY-SPEC.md
  modified: []
decisions:
  - "Option A locked: port commented Other-7.gml:7..8 `alarm[0] = 30`. spawnDelayTicks = 30 ticks (1.000 s @ 30 Hz). Sprite pinned to NaviStandD during hold. Local input ignored; server reconcile still applied."
metrics:
  duration_seconds: 98
  completed_date: 2026-05-13
  tasks_completed: 1
  files_created: 1
  files_modified: 0
---

# Phase 06.2 Plan 04: Spawn-Delay Legacy Spec (D-53) Summary

Read-only research plan that produces `06.2-04-SPAWN-DELAY-LEGACY-SPEC.md`, the legacy-source-of-truth document 06.2-10 will cite verbatim when porting the D-53 spawn-hold into REBNO. The spec extracts and locks the `alarm[0] = 30` (= 30 ticks @ 30 Hz = 1.000 s) hold duration from the preserved-but-commented block in `extracted/client-5-8/objects/0042-player/events/Other-7.gml:7..8`, and selects NaviStandD (south-facing stand) as the pinned sprite — both verbatim from the latest authoritative client revision (5-8).

## Tasks Completed

| Task | Name | Commit | Files |
| ---- | ---- | ------ | ----- |
| 1 | Author 06.2-04-SPAWN-DELAY-LEGACY-SPEC.md | c0447ca | .planning/phases/06.2-gap-closure-d-50-d-53-uat-2026-05-13/06.2-04-SPAWN-DELAY-LEGACY-SPEC.md |

## What Was Built

A single Markdown spec file with eight numbered sections:

1. **Source files inspected** — table of the five GML files in `extracted/client-5-8/objects/0042-player/events/` whose lines are load-bearing (Create, Other-7, Alarm, Step, Draw) with exact line numbers.
2. **Verbatim citations** — minimal `cat`-style citations of the active and commented code lines that ground the decision.
3. **Canonical legacy behavior in revision 5-8** — narrates what actually executes vs. what was preserved as commented documentation of prior behavior.
4. **Tick-rate conversion** — 30 steps × (1 tick / step @ 30 Hz) = 30 ticks = 1.000 s.
5. **Decision matrix** — Option A (port commented `alarm[0] = 30`) vs Option B (port only the active JoinIn → NaviStandD swap).
6. **Recommendation: Option A LOCKED** — five-point rationale citing CLAUDE.md Hard Rules #4 and #6, operator UAT, and the fact that the commented block is preserved verbatim in the latest revision.
7. **Implementation contract for 06.2-10** — explicit per-tick state-machine spec: `spawnDelayTicks = 30` initial; while > 0, decrement → pin sprite to deriveFrame(0, 0, 'down') → ignore local input → continue applying server reconcile → continue sending intent. When 0, normal logic resumes.
8. **Traceability** — closes the `doc` stage for REQ-CLI-04 (walk animation fidelity sub-clause) and REQ-CLI-08 (CLI-08 visible-on-screen acceptance).

## Key Decisions

- **Option A locked over Option B.** The commented `alarm[0] = 30` block is the only extraction-derived numeric duration available, and CLAUDE.md Hard Rule #4 mandates extraction-derived specs. Operator UAT explicitly asked for the hold. 06.2-10 does NOT re-litigate this choice.
- **Sprite during hold = NaviStandD (south-facing stand)** — derived from `Other-7.gml:5..6` `global.p_spr[pid,0] = NaviStandD; sprite_index = NaviStandD;`. No other facing is consistent with the legacy code path.
- **Server reconcile is NOT gated by `spawnDelayTicks`.** Hard Rule #1 (server-authoritative) takes precedence over the local hold; only the local optimistic-input path is suppressed.

## Files Created

- `.planning/phases/06.2-gap-closure-d-50-d-53-uat-2026-05-13/06.2-04-SPAWN-DELAY-LEGACY-SPEC.md` (154 lines, ~6.5 KB) — the canonical legacy-spec document.

## Deviations from Plan

None — plan executed exactly as written. The plan's `<output>` section says "the spec file IS the summary — no separate SUMMARY.md needed", but the worktree-parallel-executor mandate requires a SUMMARY.md to be committed before the worktree is reaped. This SUMMARY.md is therefore created to honor the worktree mandate; it carries no information beyond what is in the spec file. The spec file remains the canonical artifact for 06.2-10.

## Verification

- File exists: **PASS** — `06.2-04-SPAWN-DELAY-LEGACY-SPEC.md` present at the planned path.
- `grep "spawnDelayTicks = 30"`: **PASS** (1 match).
- `grep "\[<doc>->REQ-CLI-04\]"`: **PASS** (1 match).
- `grep "\[<doc>->REQ-CLI-08\]"`: **PASS** (1 match).
- `grep "Option A"` / `Option B`: **PASS** (4 / 3 matches respectively).
- `grep "extracted/client-5-8/objects/0042-player/events/"`: **PASS** (6 matches — exceeds ≥3 threshold).
- `pnpm trace:check`: **PASS for this spec** — no findings reference `06.2-04-SPAWN-DELAY-LEGACY-SPEC.md`. All findings emitted by the command are pre-existing (located in phase 04, 05, 06, 06.1, and other 06.2 plan files) and are out of scope for this read-only research plan.

## REQ Trace

- REQ-CLI-04: `doc` stage advanced (spawn-delay sub-fidelity of walk-animation contract).
- REQ-CLI-08: `doc` stage advanced (spawn-hold is a visible-on-screen acceptance criterion).

`impl` / `unit` stage closure for both reqs is the responsibility of 06.2-10.

## Self-Check: PASSED

- File `.planning/phases/06.2-gap-closure-d-50-d-53-uat-2026-05-13/06.2-04-SPAWN-DELAY-LEGACY-SPEC.md` exists.
- Commit `c0447ca` present on `worktree-agent-a68802d465f2da597`.
- No unexpected deletions (`git diff --diff-filter=D HEAD~1 HEAD` empty).
