diff --git a/memory.md b/memory.md index b70b281..ffefdd8 100644 --- a/memory.md +++ b/memory.md @@ -311,6 +311,18 @@ Same scope as locked in `~/claude/ideas/rimlike/plan.md`. Realistic timeline 3 - **Pattern recorded — "deferred-init data must be wired AFTER setup(), not in _ready()".** First sprite mount happened in `_ready()` and read `pawn_name` — but pawn_name is empty at _ready time (assigned later in setup()). All three pawns got atlas idx 1 (hash of empty string). Fix: moved sprite mount to `_mount_sprite()` called from setup() AND from_dict(), both of which assign pawn_name first. Idempotent (frees prior sprite). Same shape will recur for any future render that depends on per-instance saved state — always check whether the data the renderer reads is available at _ready vs after setup/from_dict. - **Delegation report — pawn reskin Slice 1.** `quick-edit` (Haiku, 1 dispatch) handled the mechanical edits across pawn.gd (facing field, save/load, `_canonical_facing`, `_atlas_for_pawn`). `gdscript-refactor` (Sonnet, 1 dispatch) wrote the new `pawn_sprite_frames.gd` helper (~50 LOC) and wired the AnimatedSprite2D into Pawn._ready (z_index, anim switching, _facing_suffix). Opus handled the asset copy + headless --import, the two parse/runtime fixes (preload + setup-not-ready), the hash-distribution audit, and the commit. The two patterns above were caught on Opus during verification. +- **BuildDrawer redesign — 2-pass iteration on Opus.** First pass made the panel auto-size and anchor to bottom-center (commit `c63926a`) plus added section headers in the Build tab. User rejected: panel "jumps around" between tabs. Second pass (commit `88e3fa9`) reverted to full-width fixed-size tray (PRESET_BOTTOM_WIDE, PANEL_HEIGHT 280 down from 600), and restructured the Build tab as side-by-side section *columns* (Structures / Furniture / Production) filling the wide tray horizontally instead of stacking vertically. Lesson saved to user-memory as `feedback_ui_trays.md`: bottom-tray panels stay full-width fixed-size; "smaller" means shorter, not narrower; sections lay out horizontally inside the tray. +- **Pattern recorded — "tray UIs: short and wide, fixed size, sections fill horizontally".** Bottom-anchored UI panels in this project are framed as trays, not cards. Player wants the tray as a visual anchor; auto-resizing it per-tab feels jumpy. Future workbench / inspector / day-summary panels should follow this rule. Help-modal and DaySummaryCard (later this session) are *modals*, not trays — different rules apply. + +- **Phase 17/18 closure sprint shipped same day** (commit `bba1ce4`). Three-agent fan-out (gdscript-refactor × 3) ships the deferred polish: **StockpilePanel** (layer 18 right-anchored; 21-chip 4-col filter grid + 5-priority segmented control + Select-all / Clear-all; mirrors WorkbenchPanel; selection chain extended to pawn → workbench → stockpile mutual-excl); **DaySummaryCard** (layer 19 modal auto-opens at dusk→night via `EventBus.day_ended`, auto-pauses sim, weather row + stats grid + green/yellow/red tension bar; Settings opt-out persists via `GameState.settings["show_day_summary"]`); **atmospheric audio** (rain-ambient loop on weather rain/storm with 0.5s fade-out, thunder sting on rain→storm transition, raid-warning sting on `EventBus.wolf_spawned`; OGGs sourced from ElvGames Cozy Melodies Pack 6 + Magic Spells Pack 6 + Sword Pack 1; reuses SFX bus so existing slider + suspend-mute inherit). Earlier worry that the `no_stockpile_accepts` + `bill_blocked` alerts needed wiring was wrong — both signals already emit end-to-end from HaulingProvider/CraftingProvider with rate-limiting and AlertsLog translators; replaced that wedge with DaySummaryCard. +- **Pattern proven 7th time — contracts-first fan-out.** Opus pre-wrote 3 EventBus signals (`stockpile_selected/deselected`, `wolf_spawned`) and the WolfSpawner emit-call before dispatch. All three agents integrated on first try. +- **Phase 19 (Onboarding) shipped same day** (commit `59ca6ba`). Decision: **hint system (option a)**, not guided-day or tutorial-scene. Three-agent fan-out: **HintSystem autoload + HintOverlay (layer 22)** 7-step tour gated on `EventBus` triggers (welcome → pawn select → build drawer → stockpile painted → work matrix → day_ended → tour_complete), per-hint dismissal persisted as `Array[String]` in `GameState.settings["dismissed_hints"]`, FIFO queue depth 3 (drop oldest), reduce-motion snap path, `reset_tour()` public API; **HelpModal (layer 20)** 5-tab static reference (Controls / Verbs / Priorities / Storyteller / Tips) opened via `EventBus.help_requested`, dim-backdrop dismiss; **SettingsMenu "Onboarding" section** with Show-hints checkbox + Help button + Reset-hints button; **tooltip pass** — `tooltip_text` via `Strings.t` on every TopBar button (with shortcut hints), BuildDrawer FAB, and every tool button (21 tools, `_add_tool_btn` extended with optional `tooltip` param). 67 new strings keys total. +- **Pattern recorded — "generic `ui_panel_opened(panel_id)` signal beats per-panel-open signals".** HintSystem needs to know when BuildDrawer + WorkPriorityMatrix open (for tour gating). Instead of adding `build_drawer_opened` + `work_matrix_opened`, added one generic `EventBus.ui_panel_opened(panel_id: StringName)` that each panel emits with its own ID. New panels just call emit; HintSystem (or any future subscriber) needs one connection. Cleaner than N per-panel signals. +- **Pattern proven 8th time — contracts-first fan-out.** Opus pre-wrote 3 EventBus signals (`help_requested`, `hint_dismissed`, `ui_panel_opened`) + 2 GameState settings defaults (`show_hints`, `dismissed_hints`) + the emit calls in `BuildDrawer.open()` and `WorkPriorityMatrix.open()` so HintSystem had clean subscribe points. One Agent A self-noted "ui_panel_opened not yet wired" but the wiring was already in place — agents sometimes report based on partial state. Trust-but-verify: I confirmed via the actual files and the runtime probe showed the chain firing correctly (welcome → dismiss → build_drawer hint). +- **MCP runtime verified Phase 19 end-to-end.** Welcome banner fired 2s after boot, dismissed → persisted in `dismissed_hints=["welcome"]`, build_drawer hint chained on next `ui_panel_opened` emit; HelpModal opened via `help_requested` with tab switching (Controls → Tips) verified. Status table in `docs/implementation.md` marked **🟡 done (pending playtest review)** — Phase 19's acceptance demo ("cold tester productive in <60s") still owed; needs a real human, not MCP. +- **Bug logged for Phase 20 polish — drag-paint eaten by camera (MED).** When a Designate/Build/Stockpile tool is active in BuildDrawer, drag-paint should rectangle-fill, but camera_rig's drag-pan consumes the drag instead. Contradicts the 2026-05-11 memory note (that was selection drag-paint, not camera-vs-paint priority). Fix shape: Selection or Designation marks drag events handled when a paint tool is active, or camera skips pan when `Designation.active_tool != TOOL_NONE`. +- **Delegation report — whole-day Phase 17 closure + Phase 19 sprints.** Six `gdscript-refactor` (Sonnet) dispatches total across the two 3-way fan-outs. Opus handled all pre-write contracts, integration glue, MCP runtime verification, and the post-fan-out cross-check + small fix-ups (W→P keybind text in HelpModal, integration spot-checks, commits). No `quick-edit` (Haiku) dispatches today — every wedge was big enough to warrant Sonnet's reasoning. + ## External references - **Forgejo repo:** https://git.rdx4.com/megaproxy/rimlike (private)