EC-013: Hotspot Magnet directional algorithm — run sheet
Paired WP: WP-091 Purpose: Run WP-091’s design work in a fixed order. Write each section into the plan as it’s done, so a stopped session loses nothing. Status: done (2026-11-28).
Evidence rule:
- Every fork fact the design relies on cites a file and symbol at the pinned commit and goes in the plan’s evidence register (E45 onward).
- Every external source goes in Appendix E.
- Every design choice that H1–H16 don’t cover is a proposed row in the decision register (H17 onward).
The WP body says what each section must answer. This sheet only records where it was written.
Pre-flight
- WP-091 is 📝 Drafted on
mainand nobody else holds it. Checked 2026-11-28: no open PR names it, no branch other than the merged draft’s, and no worktree. - Pre-flight is not required (WP-091 header). The session starts from WP-091 and this EC.
- H11, H12 and H13 were approved on 2026-11-27 as WP-089 proposed them. Plan §10.4 shows no later change, so nothing to redo.
- Work on a docs branch in its own worktree:
C:\claude-worktrees\scooby-wp091-exec, branchdocs/wp-091-hotspot-magnet-algorithm-exec, claim commitf5a3f09.
Step 0 — Pin and drift (time-box: 0:30)
- Pinned
origin/scooby-engineat1539a7b59cf3, recorded in plan §3.8 and the Part II status line. git diff --stat 0d5a69c7694f 1539a7b59cf3: 36 files across twelve merges, every one checked.- Room classes:
WizardsRuleRoomis the only new one (E45: its bottles are plain sprites, so they need the class hook).KstRoomnewly reads the pointer and the held button (E46). Both have §6.8 rows. - The toolbar: parked, only the van is on screen; hidden, none (E50).
Outcome: pinned. The drift adds two §6.8 rows and changes no earlier
finding. hitTest() moved one line (E49).
Step 1 — Prior art (time-box: 0:45)
- Android’s
FocusFinder, read from AOSP’s main branch on GitHub. - The CSS Spatial Navigation Working Draft of 2019-11-26. Its §8 came back only as a summary, so its distance function isn’t cited.
- Lab’s FOCUS cycle (E48).
- All three recorded in Appendix E.
Outcome: neither Android nor CSS claims reachability, and both rely on boxes. Lab guarantees it by ignoring direction.
Step 2 — The rules (time-box: 1:45)
- The origin of a press, and who decides each case: §5.5 (H17). §5.6 now agrees with §4.4.
- The filter and tiers: §5.1 (H18).
- The integer score and the tie-break: §5.1, §5.2 (H18).
- Nothing in the direction: stay, no wrap, fixed: §5.4 (H19).
- No repeats in Phase 1, and an 80 ms debounce: §6.3 (H21). The §4.3 contradiction is gone.
- Special cases: §5.3 (equal points: H22).
- Performance: §5.7 (E50).
Outcome: the rules are written.
Step 3 — Reachability (time-box: 1:15)
- The second of WP item 7’s outcomes. 5.1’s rules alone can strand a target (C9), so a reading-order fallback is added for left and right, with its proof: §5.8 (H20). The directions a room leaves to the core: H24.
- No selection is never a trap, by §5.5’s total rule.
- Repeats don’t change the graph. The worst case is n − 1 presses (⌊n/2⌋ in the fallback).
- The argument first tried geometry alone. The scratch check found counterexamples, which led to the fallback.
Outcome: guaranteed for any list of distinct points.
Step 4 — Navigation examples (time-box: 1:15)
- C1–C15 in Appendix C, worked by hand.
- The rule-to-case table in Appendix C.
- The scratch check, in the scratchpad only. It recomputed all 258 cells, with 0 disagreements. It also ran random layouts (§5.8’s counts), with the fallback always strongly connected and order-independent. Nothing from it is committed.
Outcome: the examples are ready for packet 4 to transcribe.
Step 5 — Tests and the per-room check (time-box: 0:45)
- Where the tests run: the self-test in Phase 1, CxxTest with the move (E47, H23), in §5.8.
- The per-room check, in §5.8. It covers every listed point, with §12.2 pointed at it and at Appendix C.
Outcome: designed.
Step 6 — Register, write-up and close (time-box: 0:45)
- H17–H24 in §10.4, proposed. Checked by script that each is cited and none lacks a row.
- §14.2 marked, §15’s C and E rows linked, and Appendix A’s “Added by WP-091” table added.
- Packet 3 marked ✅ in §11, §14.3 updated, and a revision-history row added.
- The
tv-dpadnote updated. - WP-091’s §Close checks all 16 criteria.
git diff --name-only mainlists the five allowed files.- The strict build passes.
- WP-091 set to ✅ Done in its header and in WORK_INDEX.
Outcome: closed.
Definition of done
Every step’s outcome is recorded, every WP-091 exit criterion is met with its evidence, and the WORK_INDEX row is flipped in the close commit.
Out-of-scope captures
- Room classes that catch clicks themselves. 31
bool click(int sprite) overridedeclarations in 27 headers hand a click on a sprite to the room class before the kind checks. Any of them that act on sprites of a kind H7 leaves out have no targets in Magnet mode unless the class adds them through the hook. Wizard’s Rule is one (E45). This is for packet 5, and §14.3 carries it. The listing hook’s “unpointed sprites” report won’t find these, because their sprites aren’t of an eligible kind. - A one-tick press in the timed rooms. In KST and Wizard’s Rule a press must land at a moment the room’s tick checks (Shaggy at his bench, a bottle on the beat). Whether H9’s one-tick press is always seen there is a TV check for packet 6.